[英]Not the version that should be when installing Anaconda
I have installed Anaconda 4.3.1, Python 3.6, on my Ubuntu. 我在我的Ubuntu上安装了Anaconda 4.3.1,Python 3.6。 Now when i run Python it is saying that the version is 2.7 and not 3.6 as i wanted it to be.
现在,当我运行Python时,它说版本是2.7而不是3.6,因为我想要它。 and there is no mention to Anaconda beside the version.
除了版本之外,没有提到Anaconda。 I am quite sure that i installed Anaconda the right way.
我很确定我以正确的方式安装了Anaconda。 What could i do?
我能做什么?
Try using python3
in your terminal instead of python
. 尝试在终端中使用
python3
而不是python
。 This should start the python 3.X interpreter. 这应该启动python 3.X解释器。
Note that other scripts like pip
also have an equivalent pip3
for python 3.X. 请注意,像
pip
这样的其他脚本也有python 3.X的等效pip3
。
Check which python your system is using: 检查你的系统正在使用哪个python:
which python
If it is showing the system python you need to export the path to Anaconda in your ~/.bashrc file: 如果它显示系统python你需要在〜/ .bashrc文件中导出Anaconda的路径:
export PATH="/home/username/anaconda3/bin:$PATH"
After you save the file you can activate the PATH: 保存文件后,您可以激活PATH:
source ~/.bashrc
This will then always use Anaconda when you launch a new terminal. 这将在您启动新终端时始终使用Anaconda。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.