Windows how does the quot;Pathquot; environment variable work?(Windows的“路径如何?环境变量工作?)
问题描述
当这个问题突然出现时,我最近将 python 添加到了我的环境变量中.当我在命令提示符中键入python"时,Windows 似乎知道要运行哪个文件.但是,我将 python 添加到这个名为Path"的环境变量中,并且从未在任何地方指定python".
当我输入python"时,我不明白 Windows 如何知道我想要什么.有人可以帮忙解决这个问题吗?
I recently added python to my environment variables when this question popped into my head. When I type "python" into command prompt, windows seems to know which file to run. However, I added python into this environment variable called "Path", and never specified "python" anywhere.
I don't understand how windows knows what I want when I type "python". Could someone help clear this up?
推荐答案
PATH 是一个环境变量,保存与当前用户和操作系统相关的值.它指定可执行程序所在的目录.因此,当您键入 python 时,窗口会从 PATH 获取其可执行文件.因此,您无需在命令行中输入文件的完整路径.
PATH is an environment variable that holds values related to current user and operating system. It specifies the directories in which executable programs are located. so when you type python window gets its executable from PATH. hence, you won't need to type the whole path to the file on command line.
这篇关于Windows的“路径"如何?环境变量工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Windows的“路径"如何?环境变量工作?
				
        
 
            
        基础教程推荐
- 包装空间模型 2022-01-01
 - 使用大型矩阵时禁止 Pycharm 输出中的自动换行符 2022-01-01
 - 在Python中从Azure BLOB存储中读取文件 2022-01-01
 - 无法导入 Pytorch [WinError 126] 找不到指定的模块 2022-01-01
 - 求两个直方图的卷积 2022-01-01
 - 在同一图形上绘制Bokeh的烛台和音量条 2022-01-01
 - Plotly:如何设置绘图图形的样式,使其不显示缺失日期的间隙? 2022-01-01
 - PermissionError: pip 从 8.1.1 升级到 8.1.2 2022-01-01
 - 修改列表中的数据帧不起作用 2022-01-01
 - PANDA VALUE_COUNTS包含GROUP BY之前的所有值 2022-01-01
 
    	
    	
    	
    	
    	
    	
    	
    	
				
				
				
				