我为Mac安装了Anaconda发行版。我有Mac OSX 10.8(Mountain lion)。我不经常使用Anaconda的问题是因为它使用的默认Python是2.7而我在3.3上工作或者至少更喜欢使用它。
我非常喜欢Anaconda的Spyder IDE。有没有办法让Anaconda的默认环境变为3.3而不是2.7,以便Spyder和iPython都使用3.3默认值?
我在Anaconda网站上看到以下帮助:
$ conda create -n py3k python=3 anaconda
Here python=3 and anaconda are package specifications, and it is the job of the SAT solver inside conda to find a consistent set of packages which satisfies these requirements. As the root environment uses Python 2, we had to specify the major version explicitly.
After adding the binary directory of the newly created environment to the PATH environment variable, which may be done using
$ source activate py3k
我的问题是我已经使用Homebrew单独安装了Python 3.3和相关的Scientific Python软件包,如Pandas,numpy,scipy,scikit-learn等,这样它就不会与我的Mac OS默认Python 2.7冲突。那么现在如果我在Mac终端上运行上述Conda命令会干扰我使用Homebrew安装的其他Python包吗?或者它是否会自动安装/升级Anaconda库中的python和其他软件包,而不会干扰Homebrew安装的Python或Mac OS默认Python?
请指教。
答案 0 :(得分:2)
不,Homebrew和Anaconda Pythons将完全保持彼此独立。只需确保没有设置PYTHONPATH
,这会导致这种情况不正确。
另外,你应该知道Spyder还没有在Anaconda中使用Python 3,因为还没有为Python 3构建PySide。
答案 1 :(得分:0)
我用python 2.7安装了Anaconda,但即使添加了python3:
spyder继续调用python2.7conda create --name Py3 python = 3
使用BOTH spyder和python = 3创建一个环境对我有用:
conda create --name SpyPy3 python = 3 spyder