简体   繁体   English

Python 命令在从环境变量 PATH 中删除后仍然有效

[英]Python command working even after deleting from environment variable PATH

在此处输入图像描述

Python command works in a command prompt opened before deleting its path( C:\Users\USER\AppData\Local\Programs\Python\Python310 ) in the PATH environment variable but does not work in a command prompt opened after deleting it from the environment variable. Python 命令在删除其路径( C:\Users\USER\AppData\Local\Programs\Python\Python310 )之前在 PATH 环境变量中打开的命令提示符中有效,但在从环境中删除后打开的命令提示符中无效多变的。 Could someone explain why this happens?有人可以解释为什么会这样吗? My initial thoughts: The Path Variable gets cached as soon as a new command prompt is opened and the same is used thereafter.我最初的想法:一旦打开新的命令提示符,路径变量就会被缓存,之后也会使用它。

change the python path to C:\Program Files\Python310将 python 路径更改为 C:\Program Files\Python310

or reinstall:_或重新安装:_

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

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