Python 3.6 Path Confusion

心已入冬 提交于 2019-12-12 22:45:26

问题


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

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


回答1:


configure your .bash_profile like this

alias python3='python3.6'

//Setting PATH for Python 3.6

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

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

export PATH

hope it will help.



来源:https://stackoverflow.com/questions/42477834/python-3-6-path-confusion

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!