問題描述
我正在嘗試從 windows 命令提示符 (windows 10) 運(yùn)行 python.所以結(jié)果是沒有配置path環(huán)境變量時(shí)的典型結(jié)果
I am trying to run python from the windows command prompt (windows 10). So the result is the typical one when the path environment variable is not configured
c:windowssystem32>python
'python' is not recognized as an internal or external command, operable
program or batch file
但是,我不確定應(yīng)該在路徑變量中設(shè)置哪個(gè)目錄.
however, I am not sure which is the right directory I should set up in the path variable.
我嘗試了一些變體,但都不起作用,包括:
I tried a few variations, and none of them work, including:
c:usersxxxanaconda3
c:usersxxxanaconda3Scripts
c:usersxxxanaconda3libspython34
它們都不起作用.
有沒有人對(duì)這個(gè)特定的系統(tǒng)星座(windows、anaconda)有經(jīng)驗(yàn).謝謝.
Does anyone have experience with this particular system constellation (windows, anaconda). Thanks.
推薦答案
原來(lái)我錯(cuò)了.
解決方案是:在anaconda(以及其他實(shí)現(xiàn))中,將path環(huán)境變量設(shè)置為'python.exe'的安裝目錄.
Solution is: in anaconda (as well as in other implementations), set the path environment variable to the directory where 'python.exe' is installed.
默認(rèn)情況下,anaconda 中的 python.exe 文件位于:
As a default, the python.exe file in anaconda is in:
c:.....anaconda
在你這樣做之后,很明顯,python 命令在我的例子中起作用,產(chǎn)生以下結(jié)果.
after you do that, obviously, the python command works, in my case, yielding the following.
python
Python 3.4.3 |Anaconda 2.2.0. (64|bit)|(default, Nov 7 2015), etc, etc
這篇關(guān)于anaconda - Windows 中的路徑環(huán)境變量的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!