如何将Anaconda的python设置为默认的python命令

如何将Anaconda的python设置为默认的python命令

本文介绍了如何将Anaconda的python设置为默认的python命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows机器上同时安装了Anaconda和Python 2.7.现在,命令"python"指向Python 2.7,但我希望它指向Anaconda的python.我该如何设置?

I have both Anaconda and Python 2.7 installed on my Windows machine. Right now the command "python" points to Python 2.7, but I'd like instead for it to point to Anaconda's python. How do I set this up?

推荐答案

您的PATH指向原始的Python可执行文件.您必须更新您的PATH.

Your PATH is pointing to the original Python executable. You have to update your PATH.

(假设使用Windows 7)

(Assuming Windows 7)

右键单击计算机",属性",高级"系统设置,然后单击环境变量..."按钮.

Right-click on Computer, the Properties, the Advanced system settings, then click the Environment Variables... button.

下部窗口具有系统变量.向下滚动,直到找到路径",将其选中,然后单击编辑".在出现的屏幕中,将指向原始python.exe的路径更新为anaconda路径中的路径.

The lower window has the system variables. Scroll down until you find Path, select it, and click edit. In the screen that appears, update the path that is pointing to your original python.exe to the one that is in the anaconda path.

关闭任何打开的命令窗口,以使更新生效.

Close any open command window for update to take effect.

这篇关于如何将Anaconda的python设置为默认的python命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 02:32