I have created an environment for a specific Python version using
conda create --name my_env python=3.6
when I list all the environments using conda env list I get a correct list of environments:
# conda environments:
#
base /opt/anaconda
my_env /opt/anaconda/envs/my_env
Inside /opt/anaconda/envs/my_env/bin/ there is python interpreter, which, as expected, has version 3.6. When I activate the environment
source activate my_env
it successfully activates (i.e. the terminal prompt indicates (my_env)).
However, when I try to check the python interpreter to which I am currently pointing, which python gives me:
/opt/anaconda/bin/python
which belongs to base environment, instead of
/opt/anaconda/envs/my_env/bin/python
which I would expect.
Question: Why did that happen? More importantly, how to change the Python interpreter path to which the environment points? I.e. in this case I'd like which python to point to /opt/anaconda/envs/my_env/bin/python after activating my_env.