繁体   English   中英

更改默认 pip Windows

[英]Change the default pip Windows

When I run pip show pip on Powershell, it returns me: c:\users\thomas\anaconda3\lib\site-packages

and when I run python -m pip show pip , it returns me: c:\python310\lib\site-packages

I would like to know if there is a way to replace the default current pip to the one when I run python -m pip show pip without using aliases and virtual environement.

我尝试编写一个pip.ini文件:

[global]
target = c:\python310\lib\site-packages

但它没有改变任何东西。

pip or python are executables on your computer and when you run the pip or the python command Windows uses environment variables to invoke software. 您需要修改环境变量(路径)以更改 pip 或 python 版本。

  • pippip show pip ):somewhere_on_your_computer\Python\Python310\Scripts

  • pythonpython -m pip show pip ):

我的设置(在列表中顺序很重要): 在此处输入图像描述

在此处输入图像描述

暂无
暂无

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

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