简体   繁体   中英

Not the version that should be when installing Anaconda

I have installed Anaconda 4.3.1, Python 3.6, on my Ubuntu. Now when i run Python it is saying that the version is 2.7 and not 3.6 as i wanted it to be. and there is no mention to Anaconda beside the version. I am quite sure that i installed Anaconda the right way. What could i do?

Try using python3 in your terminal instead of python . This should start the python 3.X interpreter.

Note that other scripts like pip also have an equivalent pip3 for python 3.X.

Check which python your system is using:

which python

If it is showing the system python you need to export the path to Anaconda in your ~/.bashrc file:

export PATH="/home/username/anaconda3/bin:$PATH"

After you save the file you can activate the PATH:

source ~/.bashrc

This will then always use Anaconda when you launch a new terminal.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM