I executed this command to open a .py file in idle terminal :
idle python_file.pyShell displayed the following message in response :
The program 'idle' is currently not installed. You can install it by typing:
sudo apt-get install idleI have already installed idle and infact used the same to create python_file.py. Why does shell ask me to install it again? Using Ubuntu 13.10 if it helps.
43 Answers
From your comments it appears that you don't have IDLE installed, so open the terminal and type:
sudo apt-get install idle idle3There are two different IDLEs (IDLE 3 is an IDE for Python 3) and that command will install them both.
Check your /usr/bin directory. On my machine at least, IDLE is installed under /usr/bin/idle-python2.7 and /usr/bin/python3.2, so I would open the file using:
idle-python3.2 python_file.py
It looks like idle isn't in your environment path. To see what directories are in your path, you can run:
echo $PATHWhen you execute a command from the terminal (ls, cat, etc.) bash looks for the corresponding binary/script in each of the directories listed out from the command above.
You can either install with apt as others have suggested, or if you are absolutely sure that you installed it on your system, you can try looking for it with find:
sudo find / -iname "*idle*"Which should help you determine where the binary is. Once/if you find the location of the binary, add it to your path to avoid this same error in the future:
export PATH=$PATH:/path/to/idle/binaryWhich can be added to your ~/.bashrc file.