Linux系统中已装Python 2.7.6,如何打开对应版本的IDLE?
Hey there! Let's get you up and running with the IDLE interface for Python 2.7.6 on your Linux system—here are a couple of simple, reliable methods:
1. Direct Terminal Command (Quickest Way)
First, make sure the IDLE package for Python 2.7 is installed on your system.
Check installation status: Open your terminal and run this command to see if it's already there:
dpkg -l | grep idle-python2.7
If you don't get any output, install it with this command (for Debian/Ubuntu-based distros):sudo apt-get install idle-python2.7
For RPM-based systems like Fedora/CentOS, use:sudo dnf install python2-toolsLaunch IDLE: Once installed, just run this in your terminal to open the Python 2.7 IDLE:
idle-python2.7
Some systems might alias this asidle2—if the first command fails, give that a shot instead.
2. Create a Desktop Shortcut (For Convenience)
If you don't want to type the terminal command every time, set up a desktop launcher:
- Open a text editor (like Gedit or Nano) and paste this content:
[Desktop Entry] Name=IDLE Python 2.7 Comment=Integrated Development Environment for Python 2.7.6 Exec=idle-python2.7 Icon=/usr/share/icons/hicolor/48x48/apps/python2.7.png Terminal=false Type=Application Categories=Development;IDE; - Save the file as
idle-python2.7.desktopin the~/.local/share/applications/directory. - Make it executable with this terminal command:
chmod +x ~/.local/share/applications/idle-python2.7.desktop
You should now find "IDLE Python 2.7" in your system's applications menu—click it to launch directly!
内容的提问来源于stack exchange,提问作者user2144412

