I use anaconda as a way to handle virtual environments. This means I have multiple version of python installed. I experience that the wrong python version starts when I run python from the shell.
Running
Which python
/anaconda3/envs/dash-two/bin/python
type -a python
python is /anaconda3/envs/dash-two/bin/python
python is /usr/bin/python
Inspired by this post I have tried hash -t python and looked at the output of alias
/anaconda3/envs/dash-two/bin/python
or/usr/bin/python
? – Philip Couling Feb 14 '19 at 13:15My .bash_profile script had these two lines:
export PATH="$PATH:~/bin"
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
When calling .bash_profile more than once it would keep adding to the path. The built in terminal in VS Code copies you path and runs the the .bash_profile script so starting it has the same effect as running .bash_profile twice.
The problem was that all since all lines referred to the old $PATH variable it would just keep growing.
Adding this
– haugstve Feb 14 '19 at 23:25export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin
at the start solved it.