Anaconda 和现有 Python 安装之间的系统 Python 冲突
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32107455/
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
System Python conflict between Anaconda and existing Python installation
提问by jxramos
I've been going with a basic Python3.4 install that I've been installing many modules into for over the past month but have reached a point where pip is coming up short and I'm going to just install the full Anaconda on my system to go deeper into bokeh-server stuff.
我一直在进行基本的 Python3.4 安装,在过去的一个月里我已经安装了许多模块,但已经到了 pip 不足的地步,我将在我的电脑上安装完整的 Anaconda系统更深入地了解散景服务器的东西。
I get a popup during the Windows 64bit installer (Anaconda3-2.3.0-Windows-x86_64.exe) saying
我在 Windows 64 位安装程序 (Anaconda3-2.3.0-Windows-x86_64.exe) 期间收到一个弹出窗口说
A version of Python 3.4 (64-bit) is already at C:\Python34\ We recommend that if you want Anaconda registered as your system Python, you unregister this Python first. If you really know this is what you want, click OK, otherwise click cancel to continue.
一个 Python 3.4(64 位)版本已经在 C:\Python34\ 我们建议如果你想将 Anaconda 注册为你的系统 Python,你首先取消注册这个 Python。如果您确实知道这是您想要的,请单击“确定”,否则单击“取消”继续。
Didn't find much documentation on this subject, and I'm not really sure how to "unregister" that installation of Python apart from uninstalling it entirely from Windows which I imagine would accomplish such a thing. Is this basically telling me to check how my Python Launcher for Windowsis setup after the Anaconda installation? I'm completely unfamiliar with this notion of python system registration? Is that just a round about warning about which python version takes precedence on the system path, or which installation holds the file associations?
没有找到关于这个主题的太多文档,除了完全从 Windows 卸载它之外,我不确定如何“取消注册”Python 的安装,我认为这会完成这样的事情。这基本上是告诉我在安装 Anaconda 后检查我的Python Launcher for Windows是如何设置的吗?我完全不熟悉python系统注册的这个概念?这只是关于哪个python版本在系统路径上优先的警告,或者哪个安装保存文件关联?
采纳答案by wgwz
Here is a link to a script that will unregister a Python installation(if you haven't come across it already). I personally have not dealt with anything like this. It seems like it should work, but you may have to tinker around with some of the paths in the script to get things to work. The links in @nightuser 's post will also probably fix the issue.
这是一个指向将注销 Python 安装的脚本的链接(如果您还没有遇到过)。我个人没有处理过这样的事情。看起来它应该可以工作,但是您可能需要修改脚本中的一些路径才能使事情正常工作。@nightuser 帖子中的链接也可能会解决这个问题。
Why not just remove your version of Python? You could do a pip freeze > requirements.txt
with your current Python and add them to Anaconda, or create an environment with Anaconda using those packages. Anaconda has greatly decreased the amount of time I spend setting things up.
为什么不删除您的 Python 版本?您可以pip freeze > requirements.txt
使用当前的 Python执行一个操作并将它们添加到 Anaconda,或者使用这些包使用 Anaconda 创建一个环境。Anaconda 大大减少了我花在设置上的时间。
回答by Quaternion
The solution is simply to uninstall python (for example, run the original python installer and select the uninstall option). The python key in the windows registry will be removed (which is what unregistermeans in this context).
解决办法很简单,就是卸载python(比如运行原来的python安装程序,选择卸载选项)。Windows 注册表中的 python 键将被删除(这就是unregister在此上下文中的含义)。
回答by Tina Liu
enter image description hereYou have already installed python in your environment, so your system can handle your python code. Anaconda can handle your python code as well. If you install Anaconda and expect use python provided by Anaconda, then your system will confuse about assigning the code job. To avoid this confusion, there is always a path to point out which python you want. You can ask your OS to find specific python by changing your environment pathin windows OS:
在此处输入图片描述您的环境中已经安装了python,因此您的系统可以处理您的python代码。Anaconda 也可以处理您的 Python 代码。如果您安装 Anaconda 并期望使用 Anaconda 提供的 python,那么您的系统将混淆分配代码作业。为了避免这种混淆,总有一条路径可以指出您想要哪个 python。您可以通过更改Windows 操作系统中的环境路径来让您的操作系统找到特定的 python :
By deleting the python path your Python will be invisible. Changing path is more convenient compared with the uninstall.
通过删除 python 路径,您的 Python 将不可见。与卸载相比,更改路径更方便。
If you got a python compiling software like Pycharm, things are different. Pycharm may have python3.6 while your system got python 3.5. You need to delete path in those software or uninstall python specified by those software.
如果你有像 Pycharm 这样的 Python 编译软件,事情就不一样了。Pycharm 可能有 python3.6,而你的系统有 python 3.5。您需要删除这些软件中的路径或卸载这些软件指定的python。
Actually, instead of registering the Anaconda as the system python, you can install it first, then specify your Pycharm and system path to the Anaconda python path. Thus, your Pycharm will use python provided by Anaconda and package & virtual environment you need. I edit this for lots of times because I got Great wall, so I can't close something pop up in my screen(cause it is Blank). And everything is missing if I refresh. This is annoying.
其实,不是将Anaconda注册为系统python,你可以先安装它,然后指定你的Pycharm和系统路径到Anaconda python路径。因此,您的 Pycharm 将使用 Anaconda 提供的 python 以及您需要的包和虚拟环境。我编辑了很多次,因为我有长城,所以我无法关闭屏幕上弹出的东西(因为它是空白的)。如果我刷新,一切都会丢失。这很烦人。
My system path Anaconda3's python36
我的系统路径Anaconda3的python36
Add path in Pycharm
在 Pycharm 中添加路径
Or you can't use these packages and Anacon's virtual Environment
或者你不能使用这些包和 Anacon 的虚拟环境
回答by Kirubel Tadesse
You are getting that prompt because you have another version already installed the safe way to do this is going to the directory of the existing version and running the uninstaller. Once the previous version is completely uninstalled. You can run the installation as normal it should works!
您收到该提示是因为您已经安装了另一个版本,安全的方法是转到现有版本的目录并运行卸载程序。完全卸载以前的版本后。您可以正常运行安装,它应该可以正常工作!