【发布时间】:2016-10-08 00:47:36
【问题描述】:
目前我使用conda 来管理我的python 安装,我只安装了python3。
$ which python
/Users/username/miniconda3/bin/python
$ which python3
/Users/username/miniconda3/bin/python3
所以现在python 和python3 都指向同一个目标:
$ python
Python 3.5.1 |Continuum Analytics, Inc.| (default, Dec 7 2015, 11:24:55)
[GCC 4.2.1 (Apple Inc. build 5577)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
$ python3
Python 3.5.1 |Continuum Analytics, Inc.| (default, Dec 7 2015, 11:24:55)
[GCC 4.2.1 (Apple Inc. build 5577)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
我想这可能不是一个好主意,brew doctor 也抱怨说
Warning: python is symlinked to python3
This will confuse build scripts and in general lead to subtle breakage.
那么如何将python指向osx系统默认的python 2.x版本呢?
【问题讨论】:
-
IDK 如果这是最好的方法,但如果
/Users/username/miniconda3/bin/python是符号链接,删除它可能会起作用。 -
您是否尝试过修改
.bash_profile中的PATH。我遇到了同样的问题,因为 Anaconda3 安装程序创建了这个符号链接。
标签: python macos path homebrew