在Windows中将Python与Anaconda一起使用
我刚在计算机上安装了Anaconda,因为我需要使用Numpy.
好吧,当我使用python时,出于某种原因,我必须与python.exe
放在同一文件夹中,当然,现在,我要使用Anaconda,我必须位于没有python.exe
的Anaconda3\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