-
Notifications
You must be signed in to change notification settings - Fork 0
python: Change version
cmoeckel91 edited this page Jul 13, 2018
·
8 revisions
Sometimes it can be helpful to switch between python versions 2<->3. Follow these points to switch between them.
- Install and create a new environment directly:
conda create --name <name> python=x.x
conda create --name py36 python=3.6
If not follow these steps, and go to your environment:
-
cd $HOME/anaconda/envs/<name>/bin
vi ipython- change the version of python to use in the first line (
#!<pwd>/python -> #!<pwd>/pythonx.x)
-
Install an alternative python environment
conda install python=2.7.8
or
conda install python=3.6.1 -
Create an environment for the old and the new python environment
conda create -n py36 python=3.6.1 anaconda
conda create -n py27 python=2.7.8 anaconda -
Change to the new environment
source activate py36