[英]MacOS link recent python2.7 version
I am trying to link python2.7
to the most recent brew install, which corresponds to python 2.7.13
. 我正在尝试将python2.7
链接到最新的brew安装,该安装对应于python 2.7.13
。 I know of answers like this link python with brew . 我知道像这样的答案python与brew连接 。 But it's still confusing for me. 但这仍然让我感到困惑。
What I need is to have python2.7
link to /usr/local/Cellar/python/2.7.13/bin/python2.7
. 我需要的是将python2.7
链接到/usr/local/Cellar/python/2.7.13/bin/python2.7
。 I can achieve python
to link to /usr/local/Cellar/python/2.7.13/bin/python2.7
. 我可以实现python
链接到/usr/local/Cellar/python/2.7.13/bin/python2.7
。
The problem is I have scripts that call python2.7
and no matter what I do it always returns the old MacOS installation of python2.7.5
. 问题是我有调用python2.7
脚本,无论我做什么,它始终返回python2.7.5
的旧MacOS安装。
I have also tried brew link --overwrite python@2
but the same thing happens. 我也尝试了brew link --overwrite python@2
但是发生了同样的事情。
Ideally I would like python
to link to python3.6
and python2.7
to link to python2.7.13
理想情况下,我希望python
链接到python3.6
和python2.7
链接到python2.7.13
尝试将虚拟环境用于脚本虚拟环境Doc
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.