在Windows中将Python与Anaconda一起使用 [英] Using python with Anaconda in Windows

查看:159
本文介绍了在Windows中将Python与Anaconda一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚在计算机上安装了Anaconda,因为我需要使用Numpy. 好吧,当我使用python时,出于某种原因,我必须与python.exe放在同一文件夹中,当然,现在,我要使用Anaconda,我必须位于没有python.exeAnaconda3\Scripts文件夹中.这是一场噩梦,如何在Windows计算机上将蟒蛇与蟒蛇一起使用?为什么它必须如此复杂?

I have just installed Anaconda on my computer because I need to use Numpy. Well, when I use python I for some reason have to be in the same folder as python.exe and, of course, now that I want to use Anaconda I have to be in the Anaconda3\Scripts folder where python.exe isn't. This is a nightmare, how can I use anaconda with python on a windows computer? Why does it have to be so complicated?

推荐答案

现在在Windows上安装anaconda时,它不会自动将Python或Conda添加到您的路径中.

When you install anaconda on windows now, it doesn't automatically add Python or Conda to your path.

如果您不知道conda和/或python在哪里,请在anaconda提示符(安装anaconda时出现)中键入以下命令

If you don’t know where your conda and/or python is, you type the following commands into your anaconda prompt (it comes when you install anaconda)

接下来,您可以在命令提示符下使用setx命令将 Python和Conda 添加到路径中.

Next, you can add Python and Conda to your path by using the setx command in your command prompt.

接下来,关闭该命令提示符并打开一个新命令提示符.现在,您应该可以使用python命令了.为此,请打开命令提示符,然后键入

Next close that command prompt and open a new one. You should now be able to use the python command. To do this you open a command prompt and type

python nameofPythonfile.py

python nameofPythonfile.py

来源: https://medium.com/@GalarnykMichael /install-python-on-windows-anaconda-c63c7c3d1444

这篇关于在Windows中将Python与Anaconda一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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