Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (50.2k points)

I want to create a virtual environment. And for that, I was following steps from the Conda link.

Everything runs fine until I want to source the new environment.

conda info -e

# conda environments:

#

base                  *  /Users/fwrenn/anaconda3

test_env                 /Users/fwrenn/anaconda3/envs/test_env

source ~/anaconda3/bin/activate test_env

_CONDA_ROOT=/Users/fwrenn/anaconda3: Command not found.

Badly placed ()'s.

I can't figure out the problem. 

My particulars:

OSX

python --version

Python 3.6.3:: Anaconda custom (64-bit)

conda --version

conda 4.4.7

1 Answer

0 votes
by (108k points)

I am really not certain what generates the problem in your case, but the code below runs for me without any issues (OSX, the same version of conda as yours).

Creation of the environment:

conda create -n test_env python=3.6.3 anaconda

-n test_env sets the name of the environment to test_env

python=3.6.3 anaconda says that you want to use in this environment python in version 3.6.3 and package anaconda. You can place there all the items you need, separated with spaces, e.g. SQLite matplotlib requests, and define their versions the same way as for python.

Activation

conda activate test_env

Deactivation

conda deactivate

Getting rid of it

conda remove -n test_env --all

 For the best of career growth, check out Intellipaat’s Python Course and get certified!

Related questions

0 votes
1 answer
asked Jul 11, 2020 in Python by ashely (50.2k points)
0 votes
1 answer
0 votes
1 answer

Browse Categories

...