Python 无法在 Windows 上设置 Anaconda:路径问题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20946025/
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
Unable to set up Anaconda on Windows : Path problems
提问by seeker
I've been trying to setup Anaconda 1.8 on Windows 8.1 but cant get Windows to detect it for the life of me. I've tried adding it in the system path by editing the environment variables and adding C:\Anaconda.
我一直在尝试在 Windows 8.1 上设置 Anaconda 1.8,但无法让 Windows 在我的一生中检测到它。我尝试通过编辑环境变量并将C:\Anaconda.
I've tried the Cygwin route and tried to edit .bashrcand .profile, but the path doesn't seem to reflect the presence of Anaconda.
我尝试过 Cygwin 路线并尝试编辑.bashrcand .profile,但该路径似乎并未反映 Anaconda 的存在。
Powershell output
Powershell 输出
PS C:\WINDOWS\system32> python
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
采纳答案by Peter Wang
Look closely at your PATH. If you installed Python before, maybe from the official Python.org installer, it may appear in your PATH before the C:\Anaconda\bin directory. If so, then this is your problem, and you should remove that other Python installation if you haven't customized it in any way. If you have customized it, i.e. you have installed packages into it and you don't want to remove it, then you need to move it to the end of your PATH, after the C:\Anaconda\bin entry.
仔细查看您的 PATH。如果您之前安装过 Python,可能来自官方 Python.org 安装程序,它可能会出现在您的 PATH 中 C:\Anaconda\bin 目录之前。如果是这样,那么这就是您的问题,如果您没有以任何方式对其进行自定义,您应该删除其他 Python 安装。如果您已经自定义了它,即您已经在其中安装了软件包并且您不想删除它,那么您需要将它移到 PATH 的末尾,在 C:\Anaconda\bin 条目之后。
For a nice, graphical editor for your PATH, check out Path Editor: http://patheditor2.codeplex.com/
对于 PATH 的漂亮图形编辑器,请查看路径编辑器:http: //patheditor2.codeplex.com/

