简体   繁体   English

将 python 文件夹添加到系统变量不起作用

[英]Adding python folder to system variables isnt working

I have python 3.5 on my computer installed in我的计算机上安装了 python 3.5

C:\Users\admin\AppData\Local\Programs\Python\Python35

I add this path to the variable PATH then i try python in command line then I am getting this error我将此路径添加到变量PATH然后我在命令行中尝试 python 然后我收到此错误

"python" is not recognized as an internal or external command, operable program or bath file

I even tried creating a new variable PYTHONPATH as suggested by one of the answers on stackoverflow but that didn't work for me我什至尝试按照 stackoverflow 上的一个答案的建议创建一个新变量PYTHONPATH但这对我不起作用

Edit 1: Yes , I can see the path when I enter the command path in the cmd .编辑1:是的,当我在cmd输入命令path时,我可以看到路径。 And yes the path is correct是的,路径是正确的

path shown as in cmd.exe : cmd.exe显示的路径:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\admin>path
PATH=C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\PC Connectivity
Solution\;C:\Program Files (x86)\Common Files\Intel\Shared Files\cpp\bin\Intel64
;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\Win
dowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\lenovo\easyplussdk\bin
; C:\Users\admin\AppData\Local\Programs\Python\Python35 ; C:\Users\admin\AppData
\Local\Programs\Python\Python35\Scripts;C:\Users\admin\AppData\Local\atom\bin ;
C:\Users\admin\AppData\Local\Programs\Python\Python35 ; C:\Users\admin\AppData\L
ocal\Programs\Python\Python35\Scripts

C:\Users\admin>

Please check the path you are entering, is python exactly present on the same path you provided.请检查您输入的路径,python 是否与您提供的路径完全相同。 For me I just tried to latest version of python on my windows 10 laptop, new installed path is C:\\Users\\samra\\AppData\\Local\\Programs\\Python\\Python35-32 , It was not on ---\\AppData\\Local\\Programs\\Python\\Python35对我来说,我只是在 Windows 10 笔记本电脑上尝试了最新版本的 python,新安装的路径是C:\\Users\\samra\\AppData\\Local\\Programs\\Python\\Python35-32 ,它不在---\\AppData\\Local\\Programs\\Python\\Python35
Check it and update your Path Variable, reopen the command prompt it should work.检查它并更新您的路径变量,重新打开它应该可以工作的命令提示符。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM