python 使用国内源安装软件,python国内,python lin
python 使用国内源安装软件,python国内,python lin
python linux 等 使用国内源安装软件 速度更快 你值得拥有 !
豆瓣源: https://pypi.douban.com/simple/
阿里源: http://mirrors.aliyun.com/pypi/simple/
清华源:https://pypi.tuna.tsinghua.edu.cn/simple/
华中理工大学源 :http://pypi.hustunique.com/simple/
山东理工大学 源 :http://pypi.sdutlinux.org/simple/
中国科学技术大学源 :http://pypi.mirrors.ustc.edu.cn/simple/
1、使用 pip 安装软件(包):指定源
pip install -i 源 软件(或者包)
例如:pip install -i https://pypi.douban.com/simple pymysql
2、一劳永逸的做法:
linux下,修改~/.pip/pip.conf(没有就创建一个), 修改index-url至tuna,内容如下:
[global]windows 下
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=mirrors.aliyun.com
在你的“C:\Users\你的用户名\”目录下创建“pip”目录,
“pip”目录下创建“pip.ini”文件(注意:以UTF-8 无BOM格式编码);
“pip.ini”文件内容:
[global]index-url = https://pypi.tuna.tsinghua.edu.cn/simple[install]trusted-host=mirrors.aliyun.com
注意:trusted-host 选项为了避免麻烦是必须的,否则使用的时候会提示不受信任,
或者添加“--trusted-host=mirrors.aliyun.com”选项;
注意:有网页提示需要创建或修改配置文件
(linux的文件在~/.pip/pip.conf,windows在%HOMEPATH%\pip\pip.ini),
至少Windows7下“%HOMEPATH%\pip\pip.ini”这个目录是不起作用的。
pycharm指定第三方源
点击File ---> Setting ---> ProjectInterpeter,
点击右边的?按钮弹出包管理界面 ,
选择下方的ManageRepositories按钮,
加入上面的镜像即可
源地址的后面可以有“/”,也可以没有“/”:
https://pypi.tuna.tsinghua.edu.cn/simple
https://pypi.tuna.tsinghua.edu.cn/simple/
python 使用国内源安装软件
相关内容
- python--easygui,,1.msgboxim
- python3.6使用chardet模块总是报错ValueError: Expected a bytes
- selenium3+python自动化50-环境搭建(firefox),selenium350-,前
- Selenium3+python自动化(3.7版本)-chrome67环境搭建,selen
- python2.7和python3.6共存,使用pip安装第三方库,python2.7
- Nova 通过Python API 查询,创建,删除flavor,, 1 [[email
- python学习(二十八)URL编码和解码&签名规则需求
- 使用python操作InfluxDB,python操作influxdb,环境: CentOS
- Python:你应该知道这些,Python:,1. Python的
- python 读取中文CSV 'gbk' codec can't de
评论关闭