python3修改pip源


1、修改默认源

查看当前使用源
创建pip目录:

MacBook-Pro-2:~ root# cd /Users/huangshihui/Library/Application\ Support/
MacBook-Pro-2:~ root# mkdir pip
MacBook-Pro-2:~ root# vim pip.conf

加入以下内容,修改为清华源

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple/
[install]
trusted-host=pypi.tuna.tsinghua.edu.cn

查看当前的pip3情况

huangshihui@huangshihuideMacBook-Pro-2 pip % pip3 show pip 
Name: pip
Version: 19.0.3
Summary: The PyPA recommended tool for installing Python packages.
Home-page: https://pip.pypa.io/
Author: The pip developers
Author-email: pypa-dev@groups.google.com
License: MIT
Location: /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages
Requires: 
Required-by: 

2、查看pip,python3的安装路径

huangshihui@huangshihuideMacBook-Pro-2 pip % whereis pip3
/usr/bin/pip3
huangshihui@huangshihuideMacBook-Pro-2 pip % whereis python3
/usr/bin/python3


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM