简体   繁体   English

anaconda 在 Windows 上安装 python 3.4

[英]anaconda install python 3.4 on windows

I want to install and use python 3.4 and its numerous libraries, (such as numpy, pandas, etc) using Anaconda.我想使用 Anaconda 安装和使用 python 3.4 及其众多库(例如 numpy、pandas 等)。 Unfortunately, I am unable to activate python 3.4.不幸的是,我无法激活 python 3.4。

I installed Acaconda 2.0 (Anaconda-2.0.0-Windows-x86_64) on a Windows 8 notebook.我在 Windows 8 笔记本上安装了 Acaconda 2.0 (Anaconda-2.0.0-Windows-x86_64)。 The Anaconda program installed properly and python 2.7 was installed. Anaconda 程序安装正确,python 2.7 已安装。 I then attempted to install python 3.4 using these commands at a command prompt in the C:\\Program Files\\Anaconda directory.然后我尝试在 C:\\Program Files\\Anaconda 目录中的命令提示符下使用这些命令安装 python 3.4。

$ conda update conda
$ conda create -n py34 python=3.4 anaconda
$ activate py34

The first two seemed to work fine as I saw no error messages.前两个似乎工作正常,因为我没有看到错误消息。 At the last step I receive the following error message: No environment named “py34” exits in C:\\Program Files\\Anaconda\\envs在最后一步,我收到以下错误消息: No environment named “py34” exits in C:\\Program Files\\Anaconda\\envs

Python 3.4 was installed not in the C:\\Program Files\\Anaconda but in the C:\\Users\\Daddio1949\\envs\\py34 directory. Python 3.4 不是安装在 C:\\Program Files\\Anaconda 中,而是安装在 C:\\Users\\Daddio1949\\envs\\py34 目录中。

I not sure how to proceed to finalize the installation, what should I do?我不确定如何继续完成安装,我应该怎么做?

Anaconda uses relative paths to locate the envs folder. Anaconda 使用相对路径来定位envs文件夹。 Whenever you run the anaconda.bat or the activate.bat script, the script looks for its own location, eg C:\\someplace\\Scripts\\activate.bat , then looks for an ..\\envs folder, eg C:\\someplace\\envs .每当您运行anaconda.batactivate.bat脚本时,该脚本都会查找自己的位置,例如C:\\someplace\\Scripts\\activate.bat ,然后查找..\\envs文件夹,例如C:\\someplace\\envs

What you are describing here sounds to me like you are having multiple folders with the *.bat scripts in your %PATH% variable (likely because you haven't writing rights for the C:\\Program Files\\Anaconda folder).您在此处描述的内容对我来说听起来好像您在%PATH%变量中有多个带有*.bat脚本的文件夹(可能是因为您没有对C:\\Program Files\\Anaconda文件夹的写权限)。 When running activate.bat it seems to come from your C:\\Program Files folder, whereas conda seems to run from your C:\\Users directory.当运行activate.bat它似乎来自您的C:\\Program Files夹,而conda似乎来自您的C:\\Users目录。

My suggestions:我的建议:

  • Try to run the *.bat scripts from your C:\\Users\\Daddio1949\\Scripts directory (if present).尝试从C:\\Users\\Daddio1949\\Scripts目录(如果存在)运行*.bat脚本。 If it does not exist, copy activate.bat and deactivate.bat from the Anaconda Scripts directory to your user scripts directory and run the *.bat files from there.如果它不存在,请将activate.batdeactivate.bat从Anaconda Scripts目录复制到您的用户脚本目录并从那里运行*.bat文件。
  • Try to find out if you have other activate.bat in your Windows %PATH% folders.尝试找出您的 Windows %PATH%文件夹中是否还有其他activate.bat Make sure that you call the right one.确保您拨打正确的电话。

Unfortunately, the activate script on Windows does not support activating environments not in the standard envs directory currently.不幸的是,Windows 上的activate脚本目前不支持激活不在标准envs目录中的环境。 Until this is fixed, you'll need to just modify the PATH variable manually.在修复此问题之前,您只需手动修改PATH变量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM