anaconda没有启动正确的python

时间:2016-05-13 07:33:36

标签: python macos anaconda

我在运行El Capitan的Mac OSX上遇到了anaconda的奇怪问题。

我只是尝试创建一个python 2.7环境,如下所示:

conda create -n dato-env python=2.7 anaconda

下载并安装软件包。

现在,我这样做:

source activate dato-env

导致:

discarding /Users/xargon/anaconda/bin from PATH
prepending /Users/xargon/anaconda/envs/dato-env/bin to PATH

现在当我启动python时,它会启动系统python 3 ...

Python 3.4.3 (default, Jul 13 2015, 12:18:23) 

查看路径变量,我看到:

/Users/xargon/anaconda/envs/dato-env/bin:/opt/local/bin:/opt/local/sbin:
/usr/local/fsl/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/TeX/texbin

当我以完整路径启动时:

/Users/xargon/anaconda/envs/dato-env/bin/python

启动正确的python:

Python 2.7.11 |Anaconda 4.0.0 (x86_64)| (default, Dec  6 2015, 18:57:58)

0 个答案:

没有答案