Skip to main content
Removed "anaconda" tag, added "python" tag; wrong anaconda type. OP is discussing the Anaconda data science platform.
Link
Fixed link
Source Link

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

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 I have tried hash -t python and looked at the output of alias

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

Source Link

How do I control which command is when i type python in the shell

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 I have tried hash -t python and looked at the output of alias