Use the default Python rather than the Anaconda installation when called from the terminal

Anaconda adds the path to your .bashrc, so it is found first. You can add the path to your default Python instance to .bashrc or remove the path to Anaconda if you don’t want to use it.

You can also use the full path /usr/bin/python in Bash to use the default Python interpreter.

If you leave your .bashrc file as is, any command you run using python will use the Anaconda interpreter. If you want, you could also use an alias for each interpreter.

You will see something like export PATH=$HOME/anaconda/bin:$PATH in your .bashrc file.

So basically, if you want to use Anaconda as your main everyday interpreter, use the full path to your default Python or create an alias. If you want it the other way around, remove the export PATH=.... from bashrc and use full path to Anaconda Python interpreter.

Leave a Comment