开发者

Can't set Python environment PATH variable?

开发者 https://www.devze.com 2023-04-13 01:24 出处:网络
S开发者_StackOverflow中文版o for some reason, my computer refuses to see the environment PATH variable. In the path variable, I have:

S开发者_StackOverflow中文版o for some reason, my computer refuses to see the environment PATH variable. In the path variable, I have:

C:\Python32;

listed, along with all of the other programs, but it doesn't work if I type, "python" into the command window. However, I can type "python" into the run window, and have it run the correct interpreter (I assume because I have an environment variable for that separately...? As you can see, I don't quite understand how to customize this stuff. Any help would be appreciated!


I faced the same issue.

However, in my case, I went through the documentation from python and found where I was making mistake. In the latest python versions, if you type 'python' in cmd, it will show error. At the same time, the command that worked for me was 'py'.

So I recommend anyone facing a similar problem to try this - 'py'


I know it's been a while, but I hope this could help someone else.

I had the same problem and the only way to making it work was running cmd or powershell as administrator.


You can confirm if python is in your environment variables by looking at the output of echo

%path%

Keep in mind that after editing the PATH variable using the control panel, you have to open a new terminal, as the setting will NOT be updated in existing terminals.

Another possibility is that you added the wrong path to the PATH variable. Verify it.

The bottom line is, if the directory of your python.exe is really in PATH, then running python will really work.


Try what is written here on the official documentation.


I faced the same problem. Add more specific folders to your path. For example I added this and it seemed to work out! :)

C:\Python35-32;C:\Python35-32\Lib\site-packages\;C:\Python35-32\Scripts\;

To check if it is set successfully, type python in command prompt

Can't set Python environment PATH variable?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号