Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Switching between Anaconda and Anaconda3

Is there an easy way to switch between using Anaconda (Python 2) and Anaconda3 (Python 3) from the command line? I am on Windows 10.

like image 240
Alex Avatar asked Dec 08 '22 00:12

Alex


1 Answers

In CMD as long as both Python 2 and Python 3 are installed through Anaconda:


conda create -n python2 python=2.7 anaconda
conda create -n python3 python=3.4 anaconda
conda create -n python3 python=3.5 anaconda

If you have 3.4, run line 2. If you have 3.5, run like 3. This will create 2 environment variables,

python2

This will execute Python 2.

python3

This will execute Python 3.

like image 93
abe Avatar answered Dec 11 '22 10:12

abe