我想知道在Windows上Python的安装路径。例如:
C:\Python25
如何找到Python的安装路径?
anaconda navigator
,可以进入环境
并滚动浏览环境,root
环境将指示其安装位置。当您需要将其连接到其他应用程序并想要集成一些Python代码时,这可以帮助您使用此环境。选项1:检查系统环境变量>路径
选项2:C:\Users\Asus\AppData\Local\Programs\Python(默认路径)
Which python
which py
要查找两个版本的位置,可以使用以下PowerShell命令:
$User = New-Object System.Security.Principal.NTAccount($env:UserName)
$sid = $User.Translate([System.Security.Principal.SecurityIdentifier]).value
New-PSDrive HKU Registry HKEY_USERS
Get-ChildItem "HKU:\${sid}\Software\Python\PythonCore\*\InstallPath"