I am using Mac OS X Version 10.13.1 and I have just installed anaconda. I have created a virtual environment using the command
conda create -n py3 python=3
Then, I have started the python interpreter using the command
python
To my surprise, the preinstalled python 2.7 from /usr/bin showed up instead of python 3.6. In order to check what is going wrong I issued the command
which python
The result was even more surprising, I got the following:
/Users/karlstroetmann/anaconda2/envs/py3/bin/python
When I then invoked the command
/Users/karldrstroetmann/anaconda2/envs/py3/bin/python
I did get python 3.6.3. But I don't understand why I cannot invoke this version by just typping python
. What am I missing here? Any hints would be very much appreciated.
hash -t python
? Then tryhash -r
if it doesn't match & see.