Idle and Anaconda
Asked Answered
P

3

10

I use to have idle. Then I downloaded Anaconda and opened idle through there. I have not used idle for a while but just recently went to go open it up and use it again. However, it seems I no longer have idle on my computer, to my understanding I can still get to idle through Anaconda but I forgot how. Is there a way to open idle through Anaconda without re-downloading idle? If so what command can I use to pull Idle up?

Parthinia answered 10/5, 2018 at 17:29 Comment(8)
try ~/anaconda3/bin/idle if you have anaconda 3. Or if you want an IDLE from a specific environment, ~/anaconda3/envs/my_env/bin/idle3 (if it is a Python 3 environment)Hyla
I tried both the lines you suggested this same error showed up: File "<stdin>", line 1 ~/anocaonda3/envs/my_envs/bin/idle3 ^ SyntaxError: invalid syntaxParthinia
Not in the Python interpreter, but in your terminal shell, assuming some *nixy environment.Hyla
Sorry, I don't understand, do you mean I should type it in my command prompt?Parthinia
Yes. Are you on Windows? For these sorts of questions you should really specify exactly what you are doing. Details like your operating system would matter here. Also, are you using something like Anaconda Navigator? Help us help you.Hyla
Yes I have a windows computer. When I type those two lines in the command prompt i get the error: '~' is not recognized as an internal or external command, operable program or batch file.Parthinia
I have the aconaconda promptParthinia
I am trying to get idle to pull up in the anaconda prompt but im not sure how to do soParthinia
H
6

Search for this folder "idlelib" in the Lib folder of the Anaconda version you have installed and you will find idle (check its file type: "compiled python file").
Pin it to your taskbar and run.

Heterolecithal answered 6/9, 2018 at 0:44 Comment(1)
This is the perfect answer to the question that was asked.Reproachful
S
5

You are looking for C:\... <\> ...Anaconda3\Lib\idlelib\idle.bat

There is also C:\ ... <\> ...Anaconda3\Scripts\idle.exe which seems to run a little smoother, but there has to be a Command Prompt open in the background to run. ... ?

Navigate to your Anaconda3 installation folder. Yours could be anywhere, mine is at "C:\ProgramData\Anaconda3", but I installed for all users and you could have selected a random location on your drive. If you managed to add it to the environment variables you could easily find it by running the Command Prompt (not Powershell - has to be Command Prompt) and typing where conda or where anaconda and pressing enter. You should find a folder named Anaconda3 or something of that nature.

If you navigate to this folder, and within it find the "Anaconda3\Lib\idlelib\" folder, within it there is a file called "idle.bat". If you find this "Anaconda3\Lib\idlelib\idle.bat" file you can double click it to run IDLE, although it may be a little messy/outdated/glitchy/strange since you are updating all kinds of folders within Anaconda and some of them may have helped idle.bat run. Mine has a the spyder icon associated with it in the task bar and a blotted out IDLE icon in the top left corner for some reason. You could of course run the full path in command prompt as well if you already know where it is, for instance I would run...

C:\Users\Thomas>C:\ProgramData\Anaconda3\Lib\idlelib\idle.bat ~or~ C:\Users\Thomas>C:\ProgramData\Anaconda3\Scripts\idle.exe

--> It may be easier to just download a new version of Python side by side with Anaconda to run IDLE. I have been attempting to set a shortcut in the Start Menu that runs from anaconda properly for days and have failed. This way, there should be a right click>'run with IDLE' option for python files.

I believe the tilde slash (~/) was meant to imply your home directory since that is what it signifies on a linux machine, but seeing as you could have put it anywhere on the machine, even directly on the C:\ drive, maybe he meant 'unknown file path'.

Strangury answered 10/2, 2019 at 12:41 Comment(0)
D
1

If you are running MacOs (currently I am on Catalina - MacOs10.15) it is quite simple to run IDLE from Anaconda environment:

  1. Launch Anaconda
  2. Go to MacOs Terminal.
  3. Type IDLE3

warning: if you type IDLE, the Python 2 IDLE will be opened ... but if you are using Python3 installed with Anaconda ... it doesn't work properly.

Dissent answered 30/12, 2021 at 6:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.