For running python2 all I do is activate the required conda environment and just type idle. It automatically opens IDLE for python 2.7. But I can't figure out how to do this for Python 3. I have python 3.5 installed in my environment.
I used conda create -n py35 anaconda
for install installing python 3.5 .
Just in case others searched for how to open IDLE from a conda virtualenv and found this answer, the process that works for me is:
activate myenv
python -m idlelib
This should open up the IDLE editor and you can run code within myenv
.
To install another version of Python (e.g. Python 3.5.2), when using Anaconda for one version of Python (e.g. Python 2.7), you can do the following on the Anaconda prompt:
First, create a new conda environment and install python 3.5.2 with anaconda:
conda create -n py352 python=3.5.2 anaconda
Once complete, if you want to access IDLE of Python 3.5.2 quickly on Windows:
"C:\..Anaconda\envs\py352"
folder on Explorerpythonw.exe
file located on that folder.Right click the shortcut, go to Properties, and change the target field in the Shortcut tab from
C:\....\Anaconda\envs\py352\pythonw.exe
to
C:\...\Anaconda\envs\py352\pythonw.exe "C:\...\Anaconda\envs\py352\Lib\idlelib\idle.pyw"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With