Anaconda Activate

How to activate an Anaconda environment

If this happens you would need to set the PATH for your environment (so that it gets the right Python from the environment and Scripts\ on Windows).

Imagine you have created an environment called py33 by using:

conda create -n py33 python=3.3 anaconda

Here the folders are created by default in Anaconda\envs, so you need to set the PATH as:

set PATH=C:\Anaconda\envs\py33\Scripts;C:\Anaconda\envs\py33;%PATH%

Now it should work in the command window:

activate py33

The line above is the Windows equivalent to the code that normally appears in the tutorials for Mac and Linux:

$ source activate py33

More info:
https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/8T8i11gO39U

Does `anaconda` create a separate PYTHONPATH variable for each new environment?

Best way to activate my conda environment for a python script on a windows PC

Not a Windows user, but conda activate is for interactive shell sessions. The conda run command is for programmatic execution within an environment. So, you would have a script with a line like:

conda run -n my_env python your_script.py

or possibly

conda run -p /path/to/my_env python your_script.py

if trying to share the environment across users.

If the script requires interaction, you may need to add flags (like --live-stream and/or --no-capture-output). See conda run --help.

How to activate an Anaconda environment from the command line?

To create an environment:
conda create --name myenv

NOTE: Replace myenv with the environment name.

When conda asks you to proceed, type y:

proceed ([y]/n)?for more detail click this

about activate this may help

to add anaconda to path

In Windows, you will have to set the path to the location where you installed Anaconda3 to.

For me, I installed anaconda3 into C:\Anaconda3. Therefore you need to add C:\Anaconda3 as well as C:\Anaconda3\Scripts\ to your path variable, e.g. set PATH=%PATH%;C:\Anaconda3;C:\Anaconda3\Scripts.



Related Topics



Leave a reply



Submit