I currently have python3 set as my default python version but I'd like to be able to switch back to python2 for certain things so I created a conda environment with the following command:
conda create -n py2 python=2.7
and then activated it with:
source activate py2
but when I do:
python --version
I still get
Python 3.6.8
What am I doing wrong here? I'm trying to download a conda package this is only python2 compatible but despite being in a python2 environment, it keeps telling me my python version is incompatible.
You might be running into the issue where you have multiple environments on top of one another.
Try running:
conda deactivate
multiple times in order to exit from all of the environments. Then run:
condo activate py2
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.