Python 3.6路径混乱 [英] Python 3.6 Path Confusion

查看:154
本文介绍了Python 3.6路径混乱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

与"pip3"一起运行"python3"命令以安装多个python模块时出现问题.看来我的pip3已链接至python 3.6(这是我想使用的),但是python3已链接至3.5.见下文:

I'm having issues when running the "python3" command along with "pip3" to install several python modules. It seems like my pip3 is linked to python 3.6 (which is what I want to use), but python3 is linked to 3.5. See below :

pip3 --version
    pip 9.0.1 from /usr/local/lib/python3.6/site-packages (python 3.6)

python3 --version
    Python 3.5.2

我想运行python3.6,并且我认为我的PATH变量可能不正确(或某种程度的错误).谢谢

I'd like to run python3.6, and I am thinking that my PATH variable may be incorrect (or something to that extent). Thanks

推荐答案

像这样配置您的.bash_profile

alias python3='python3.6'

//为Python 3.6设置PATH

//Setting PATH for Python 3.6

///原始版本保存在.bash_profile.pysave

//The original version is saved in .bash_profile.pysave

PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"

export PATH

希望它会有所帮助.

这篇关于Python 3.6路径混乱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆