在现有的 python 系统上安装 anaconda?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/34906338/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Installing anaconda over existing python system?
提问by anjchang
I found an old windows xp machine running Python 2.5.2
. I would like to use Anaconda instead. Can I just install Anaconda on it and do I have to uninstall Python 2.5.2? Similarly, I have a Mac system with Python 2.7.9
working with some NLT libraries and I'd like to get Anaconda running on it too. What's the best course of action to get Anaconda over an existing system that already has python?
我发现了一台运行 Python 的旧 Windows xp 机器2.5.2
。我想改用 Anaconda。我可以只在其上安装 Anaconda 而我是否必须卸载 Python 2.5.2?同样,我有一个使用 Python2.7.9
和一些 NLT 库的 Mac 系统,我也想让 Anaconda 在它上面运行。在已有 Python 的现有系统上使用 Anaconda 的最佳做法是什么?
采纳答案by Dimitris Fasarakis Hilliard
Simply install.
只需安装.
Anaconda manages Python for you and creates the appropriate bin
directory containing the executable and pkgs
directory containing installed packages. All this in a directory structure named anaconda
(or anaconda3
if using Python 3). Additionally, it alters the search path so the Python inside the anaconda/bin/
directory is the one used when the command python
is issued.
Anaconda 为您管理 Python 并创建bin
包含可执行文件的适当目录和pkgs
包含已安装包的目录。所有这些都在一个名为anaconda
(或者anaconda3
如果使用 Python 3)的目录结构中。此外,它会更改搜索路径,因此anaconda/bin/
目录中的 Pythonpython
是发出命令时使用的 Python 。
On Ubuntu, it looks like this:
在 Ubuntu 上,它看起来像这样:
# added by Anaconda 2.3.0 installer
export PATH="/home/jim/anaconda/bin:$PATH"
By adding the new path in the beginning of PATH
it assures the anaconda bin/python
will be located first.
通过在开头添加新路径PATH
可确保bin/python
首先定位anaconda 。
Warning:
警告:
do I have to uninstall Python 2.5.2?
我必须卸载 Python 2.5.2 吗?
In general never remove the 'original' Python unless explicitly allowed by official sources. In many operating systems Python is a dependency; it muststay around. I can't speak for old versions of Windows but in general if you're not sure if it is needed or not leave it.
通常,除非官方来源明确允许,否则永远不要删除“原始”Python。在许多操作系统中,Python是一个依赖项;它必须留在周围。我不能说旧版本的 Windows,但一般来说,如果您不确定是否需要或不保留它。
Removing it might breaksome completely unrelated things.
删除它可能会破坏一些完全不相关的东西。
回答by Daniel Schneiter
The Python installation on a Mac is not affected at all when installing Anaconda. However, Anaconda manipulates the $PATH environment variable. No need to uninstall Python.
安装 Anaconda 时,Mac 上的 Python 安装完全不受影响。但是,Anaconda 操作 $PATH 环境变量。无需卸载 Python。
回答by Anderson Oki
1 - Do not uninstall Python from our existing System. The Anaconda installer install Python if necessary
1 - 不要从我们现有的系统中卸载 Python。Anaconda 安装程序根据需要安装 Python
You can check what the anaconda packages includes: http://docs.continuum.io/anaconda/pkg-docs
您可以检查 anaconda 包包含的内容:http: //docs.continuum.io/anaconda/pkg-docs
This also applies to Mac OS, from both Python 2.x or 3.x
这也适用于 Mac OS,从 Python 2.x 或 3.x