I am trying to create a new conda Python 2.7 environment. For this purpose I am typing this in terminal:
conda create -n my_env_name python==2.7
After activating created environment (conda activate my_env_name
) and checking Python version (python --version
) I am getting Python 3.10.2
No matter which Python version I am trying to use in the new environment I am always getting Python 3.10.2 answer when checking the Python version.
Any idea what is wrong and how to solve this?
(I am working on iMAC, Chip Apple M1, macOS Monterey 12.1)
(After doing the same on my old machine everything works fine and after checking the Python version in a newly created environment I am getting Python 2.7.18.)
Here are some additional info.
- When env is activated commands:
which python
gives- /opt/local/bin/pythontype python
gives- python is /opt/local/bin/pythonecho $PATH
gives- /opt/local/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/uros/Desktop/iraf-main/unix/hlib/ecl.sh://Users/uros/.iraf/bin:/opt/anaconda3/envs/py27/bin:/opt/anaconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin
- When env is not activated commands:
which python
gives- /opt/local/bin/pythontype python
gives- python is /opt/local/bin/pythonecho $PATH
gives- /opt/local/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/uros/Desktop/iraf-main/unix/hlib/ecl.sh://Users/uros/.iraf/bin:/opt/anaconda3/bin:/opt/anaconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin