Python version

0 views
Skip to first unread message

Voltage crayon 24

unread,
Oct 16, 2020, 11:33:04 PM10/16/20
to Anaconda - Public
I want to create a new environment for anaconda navigator. I want the python version to be 3.7 instead of 3.8 because tensorflow does not support 3.8 yet. I go the environment tab on the left side and click it. I click create. When I got to select the python version, it only gives me the option of 3.8. How to I setup a virtual environment where I can select 3.7 for the python version instead of 3.8?

sree datta

unread,
Oct 20, 2020, 1:18:40 PM10/20/20
to Anaconda - Public, vedansh...@gmail.com
Vedansh

Use the Anaconda (base) prompt to create the new environment with a specific version of python:

At your prompt type (base) $ conda create -n py37env python=3.7

conda create - you are instructing conda to create
-n py37env - (-n is a short cut for --name; i chose py37env as the name)
python=3.7 - specifies the version of python you want the environment to have

at the base prompt you can search what versions plus build of Python is available on conda repositories with

(base) $ conda search python 

Your output will show (partial shown for 3.7)

python                         3.7.0      h6e4f718_3  pkgs/main            
python                         3.7.0      hc3d631a_0  pkgs/main            
python                         3.7.1      h0371630_3  pkgs/main            
python                         3.7.1      h0371630_7  pkgs/main            
python                         3.7.2      h0371630_0  pkgs/main            
python                         3.7.3      h0371630_0  pkgs/main            
python                         3.7.4      h265db76_0  pkgs/main            
python                         3.7.4      h265db76_1  pkgs/main            
python                         3.7.5      h0371630_0  pkgs/main            
python                         3.7.6      h0371630_2  pkgs/main            
python                         3.7.7 h191fe78_0_cpython  pkgs/main            
python                         3.7.7 hcf32534_0_cpython  pkgs/main            
python                         3.7.7      hcff3b4d_4  pkgs/main            
python                         3.7.7      hcff3b4d_5  pkgs/main            
python                         3.7.9      h7579374_0  pkgs/main            
python                         3.8.0      h0371630_0  pkgs/main


Now you can choose the correct version of python for tensorflow. Let us say, for example, it was 3.7.2 then

At your prompt type (base) $ conda create -n py37env python=3.7.2

If you are going to use Anaconda on Windows (or Linux), instead of the Navigator, I would recommend using the command line / terminal, asin thelong run that will be lot more helpful for data science work.
Reply all
Reply to author
Forward
0 new messages