我爲Mac安裝了Anaconda發行版。我有Mac OSX 10.8(山獅)。我不經常使用Anaconda的問題是因爲它使用的默認Python是2.7,而我在3.3或更高版本上工作時寧願使用它。在Mac OS 10.8的Anaconda中更改默認Python環境(從2.7到3.3)
我非常喜歡Anaconda的Spyder IDE。有沒有辦法讓Anaconda的默認環境改爲3.3而不是2.7,這樣Spyder和iPython都使用3.3默認值?
我看到蟒蛇的網站上的以下幫助:
$ 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
我的問題是我已經單獨安裝的Python 3.3和相關科學Python包像熊貓,numpy的,SciPy的,scikit學習等使用自制軟件,使其與我的Mac OS默認Python 2.7不衝突。那麼現在,如果我在Mac Terminal中運行上述Conda命令,它是否會干擾我使用Homebrew安裝的其他Python軟件包?或者它會自動安裝/升級蟒蛇和其他包在Anaconda庫中,而不會干擾Homebrew安裝的Python或Mac OS默認Python?
請指教。
只要確保'源activate'所需的蟒蛇,和你應該沒問題。您可以隨時通過'哪個python'(或'which conda','哪個pip')來告訴哪個python在終端處於「活動」狀態。 – TomAugspurger
@TomAugspurger如何「源激活」特定的Python版本? –
conda環境將有一個'bin'文件夾和一個'activate'腳本。所以你想'源 /斌/激活' –
TomAugspurger