Shell asks me to install IDLE despite it being already installed

I executed this command to open a .py file in idle terminal :

idle python_file.py

Shell displayed the following message in response :

The program 'idle' is currently not installed. You can install it by typing:
sudo apt-get install idle

I 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.

4

3 Answers

From your comments it appears that you don't have IDLE installed, so open the terminal and type:

sudo apt-get install idle idle3

There 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 $PATH

When 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/binary

Which can be added to your ~/.bashrc file.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like