python国内pip镜像源
1672 2021-11-12 11:40
命令行临时修改法
C:\Windows\system32>pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip
-U
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: pip in c:\users\21\appdata\local\programs\python\
python38\lib\site-packages (21.3.1)
命令行永久修改法
C:\Windows\system32>
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
安装pygame:
python3 -m pip install -U pygame --user # linux下,windows下用python/py即可
pip install easygui
pip install matplotlib
C:\Windows\system32>pip list
Package Version
---------- -------
easygui 0.98.2
numpy 1.21.4
pip 21.3.1
pygame 2.1.0
setuptools 56.0.0
C:\Windows\system32>
安装海龟库
pip install -e E:\Tools\常用工具\pythonSetup\turtle-0.0.2
安装快速排序动画演示
pip install ipdb
pip install opencv-python
命令行写入阿里云
C:\Windows\system32>pip config set global.index-url http://mirrors.aliyun.com/pypi/simple
Writing to C:\Users\21\AppData\Roaming\pip\pip.ini
C:\Windows\system32>pip config set global.trusted-host mirrors.aliyun.com
Writing to C:\Users\21\AppData\Roaming\pip\pip.ini
C:\Windows\system32>
升级pip到指定版本
python -m pip install --user --upgrade pip==23.1.1
%userprofile%
%appdata%
全部评论