tensor
tensor

Reputation: 3340

Command line conda with 2 anaconda installation

To make easier migration, 2 Anaconda versions have been installed on Windows: Anaconda 27 and Anaconda 34

However, on the command line conda update ...., how can I specify the right 'conda.exe' apart from putting the full path for conda?

Upvotes: 0

Views: 2407

Answers (1)

Mike Müller
Mike Müller

Reputation: 85482

Recommended Solution - Using conda Environments

Instead of installing two different Anaconda version, I would recommend to use conda environments. Create one for Python 2.7:

conda create -n py27 python=2.7

Now, you can activate it with:

activate py27

the prompt will change to

(py27)

and:

(py27) conda install anaconda 

will install all Anaconda packages.

Likewise, do it for Python 3.5:

conda create -n py35 python=3.5  anaconda

This will install all anaconda packages right away.

Solutions for Already Installed Multiple Anaconda Versions

If you already have installed two Anaconda versions these solutions might work for you.

Using two command line windows

You can set the PATH environmental variable.

In your first shell do:

set PATH=C:\path\to\conda2;$PATH$

and in your second:

set PATH=C:\path\to\conda3;$PATH$

Now conda should be the version you set with the PATH.

Using one command line window

You can a create two batch files that you put in your PATH:

conda2.cmd

C:\path\to\conda2\conda.exe

conda3.cmd

C:\path\to\conda3\conda.exe

Now conda2 should start the Python 2 and conda3 the Python 3 version.

Upvotes: 2

Related Questions