是否将Anaconda添加到Path [英] Adding Anaconda to Path or not

查看:504
本文介绍了是否将Anaconda添加到Path的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

官方建议不要在Windows PATH环境变量中添加Anaconda/Python.但是,如何确保自定义构建脚本能够找到python? (例如我的sphinx make.bat).

The official recommendation is not to add Anaconda / Python to the Windows PATH environment variable. But how can I ensure then that my custom build scripts find python? (e.g. my sphinx make.bat).

推荐答案

更新

当前的Anaconda安装提供的路径上带有conda的"Anaconda提示".转到Windows的开始"按钮(窗口"图标),然后开始键入anaconda.您应该看到一个条目"Anaconda Prompt".点击它.将打开一个新窗口,该窗口的搜索路径中为conda.根据需要使用尽可能多的Anaconda提示.

Current Anaconda installations offer an "Anaconda Prompt" that has conda on the path. Go to the Windows start button (Window icon) and start typing anaconda. You should see an entry "Anaconda Prompt". Click on it. A new window opens that has conda in the search path. Use as many Anaconda prompts as needed.

旧答案

一个好的方法是在conda环境中工作.

A good way is to work with conda environments.

  1. conda.exe的路径临时添加到PATH:

set PATH=C:\my\path\to\conda;%PATH%

创建一个新环境:

conda create -n py36 python=3.6

激活它:

activate py36

现在,提示应更改为py36,并且由于设置了所有必需的路径,所有提示均应正常工作.激活此环境后,您需要安装项目所需的所有软件包.完成后,用deactivate停用它.

Now the prompt should change to py36 and all should work since all needed paths are set. You need to install all your packages you need for your project while this environment is activated. When done deactivate it with deactivate.

这篇关于是否将Anaconda添加到Path的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆