【发布时间】:2017-05-23 04:26:14
【问题描述】:
我一直在尝试通过最初安装 Homebrew 在 OS X 上更新 python3(当前设置为 python 3.5.1):
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
然后安装python:
$ brew install python
在尝试将我的 brew 安装的 python 作为我的默认链接之前,我运行:
$ brew info python3
...
/usr/local/Cellar/python3/3.6.1
...
$ python3 -V
Python 3.5.1
所以现在我执行取消链接和链接:
$ brew unlink python3 && brew link python3
然后我跑了:
$ python3 -V
Python 3.5.1
Python3 仍然默认使用随附的 3.5.1 python。我查看了整个堆栈溢出似乎找不到解决方案或可能发生这种情况的原因。任何帮助都会很棒,谢谢!
更新: 我猜当我安装 python 3.6.1 时,它的命令设置为 python3.6:
$ python3.6 -V
Python 3.6.1
【问题讨论】:
-
which python3的输出是什么? -
哦,运行
brew doctor也可能有所帮助。
标签: python macos installation homebrew symlink