[英]Pip installs to wrong folder
I just reinstalled Python to C:\\Program Files (x86)\\Programming Languages\\Phyton我刚刚将 Python 重新安装到 C:\\Program Files (x86)\\Programming Languages\\Phyton
if I now install something, eg: pip install pygame
, it installs it to C:\\Users\\Gereon\\AppData\\Roaming\\Python and I found folders there I don't want there.如果我现在安装一些东西,例如: pip install pygame
,它会将它安装到 C:\\Users\\Gereon\\AppData\\Roaming\\Python 并且我在那里找到了我不想要的文件夹。 I also want to install pip packages to a location where I'll find it quicker, like before: C:\\\\Program Files (x86)\\\\Programming Languages\\\\Phyton\\\\lib\\\\site-packages
我还想将 pip 包安装到我可以更快找到它的位置,就像以前一样: C:\\\\Program Files (x86)\\\\Programming Languages\\\\Phyton\\\\lib\\\\site-packages
I already tried some things and found the command: `python -m site.我已经尝试了一些东西并找到了命令:`python -m site. I got the following:我得到以下信息:
sys.path = [
'C:\\Users\\Gereon',
'C:\\Program Files (x86)\\Programming Languages\\Phyton\\python38.zip',
'C:\\Program Files (x86)\\Programming Languages\\Phyton\\DLLs',
'C:\\Program Files (x86)\\Programming Languages\\Phyton\\lib',
'C:\\Program Files (x86)\\Programming Languages\\Phyton',
'C:\\Users\\Gereon\\AppData\\Roaming\\Python\\Python38\\site-packages',
'C:\\Program Files (x86)\\Programming Languages\\Phyton\\lib\\site-packages',
]
USER_BASE: 'C:\\Users\\Gereon\\AppData\\Roaming\\Python' (exists)
USER_SITE: 'C:\\Users\\Gereon\\AppData\\Roaming\\Python\\Python38\\site-packages' (exists)
ENABLE_USER_SITE: True
Now obviously I see a correlation, but I'm unable to find any solutions, that satify my needs.现在显然我看到了相关性,但我无法找到满足我需求的任何解决方案。
PS: pip install --target="C:\\\\Program Files (x86)\\\\Programming Languages\\\\Phyton\\\\lib\\\\site-packages" pygame
is not what I'm looking for. PS: pip install --target="C:\\\\Program Files (x86)\\\\Programming Languages\\\\Phyton\\\\lib\\\\site-packages" pygame
不是我要找的。
MrFuppes帮了我很多:我只需要以管理员身份运行 CMD
I just reinstalled Python to C:\\Program Files (x86)\\Programming Languages\\Phyton我刚刚将Python重新安装到C:\\ Program Files(x86)\\ Programming Languages \\ Phyton
if I now install something, eg: pip install pygame
, it installs it to C:\\Users\\Gereon\\AppData\\Roaming\\Python and I found folders there I don't want there.如果我现在安装一些东西,例如: pip install pygame
,它会将其安装到C:\\ Users \\ Gereon \\ AppData \\ Roaming \\ Python,我在那里找到了我不想要的文件夹。 I also want to install pip packages to a location where I'll find it quicker, like before: C:\\\\Program Files (x86)\\\\Programming Languages\\\\Phyton\\\\lib\\\\site-packages
我还想将pip软件包安装到可以更快找到的位置,例如之前: C:\\\\Program Files (x86)\\\\Programming Languages\\\\Phyton\\\\lib\\\\site-packages
I already tried some things and found the command: `python -m site.我已经尝试了一些东西,并找到了命令:`python -m site。 I got the following:我得到以下内容:
sys.path = [
'C:\\Users\\Gereon',
'C:\\Program Files (x86)\\Programming Languages\\Phyton\\python38.zip',
'C:\\Program Files (x86)\\Programming Languages\\Phyton\\DLLs',
'C:\\Program Files (x86)\\Programming Languages\\Phyton\\lib',
'C:\\Program Files (x86)\\Programming Languages\\Phyton',
'C:\\Users\\Gereon\\AppData\\Roaming\\Python\\Python38\\site-packages',
'C:\\Program Files (x86)\\Programming Languages\\Phyton\\lib\\site-packages',
]
USER_BASE: 'C:\\Users\\Gereon\\AppData\\Roaming\\Python' (exists)
USER_SITE: 'C:\\Users\\Gereon\\AppData\\Roaming\\Python\\Python38\\site-packages' (exists)
ENABLE_USER_SITE: True
Now obviously I see a correlation, but I'm unable to find any solutions, that satify my needs.现在很明显,我看到了一种相关性,但是我找不到任何满足我需求的解决方案。
PS: pip install --target="C:\\\\Program Files (x86)\\\\Programming Languages\\\\Phyton\\\\lib\\\\site-packages" pygame
is not what I'm looking for. PS: pip install --target="C:\\\\Program Files (x86)\\\\Programming Languages\\\\Phyton\\\\lib\\\\site-packages" pygame
不是我想要的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.