mac|mac 切换Python版本

【mac|mac 切换Python版本】mac 系统本身自带了 python 2.6版本,然后自己又下载了python 3.5,导致在终端命令中不能切换,
打开 ~/.bash_profile
# Setting PATH for Python 2.7 # The orginal version is saved in .bash_profile.pysave PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}" export PATH# Setting PATH for Python 3.5 # The orginal version is saved in .bash_profile.pysave # PATH="/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}" # export PATH # alias python="/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5" export PATH=/opt/subversion/bin:$PATH[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

只想在终端中切换
mac|mac 切换Python版本
文章图片
C76D7849-CA17-41A6-A826-EFBDF146AE09.png mac|mac 切换Python版本
文章图片
660CF8F9-957F-4CA3-9AEF-3EDCF4351C5F.png 问题
  • 1.当安装pip install twisted时候遇到权限,所以加个sudo
mac|mac 切换Python版本
文章图片
DF95FCC3-2297-4B5C-8708-EBC7834D6D34.png mac|mac 切换Python版本
文章图片
Paste_Image.png
网络不好,多尝试几遍成功了
也可以参照 http://blog.csdn.net/lijiang1991/article/details/51775896

    推荐阅读