python 使用国内源安装软件
python linux 等 使用国内源安装软件 速度更快 你值得拥有 !
豆瓣源:pip install -i https://pypi.douban.com/simple/
阿里源:pip install -i http://mirrors.aliyun.com/pypi/simple/
清华源:pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/
华中理工大学源 :pip install -i http://pypi.hustunique.com/simple/
山东理工大学 源 :pip install -i http://pypi.sdutlinux.org/simple/
中国科学技术大学源 :pip install -i 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至trusted-host,内容如下:
[global]
index-url = https://pypi.douban.com/simple/
[install]
trusted-host = mirrors.douban.com
- windows 下
在你的“C:\Users\你的用户名\”目录下创建“pip”目录,
“pip”目录下创建“pip.ini”文件(注意:以UTF-8 无BOM格式编码);
“pip.ini”文件内容:
[global]
index-url = https://pypi.douban.com/simple
[install]
trusted-host = mirrors.douban.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 ---> Project Interpeter,
点击右边的➕按钮弹出包管理界面 ,
选择下方的Manage Repositories按钮,
加入上面的镜像即可
源地址的后面可以有“/”,也可以没有“/”:
https://pypi.tuna.tsinghua.edu.cn/simple
https://pypi.tuna.tsinghua.edu.cn/simple/
python 使用国内源安装软件的更多相关文章
- debian9使用国内源安装docker以及一些使用方法
debian9使用国内源安装docker以及一些使用方法 首先, 我的环境是debian, 容器是centos debian 扔源 # deb-src [arch=amd64] https://m ...
- ubuntu ARM换国内源和国内源安装ROS
ubuntu arm换国内源: https://www.cnblogs.com/yongy1030/p/10315569.html 国内源安装ROS: https://blog.csdn.net/ch ...
- centos7 安装zabbix3.0 安装zabbix4.0 yum安装zabbix 国内源安装zabbix 阿里云服务器安装zabbix
首先,此篇文章是有原因的. 刚开始也和大家一样来学习安装zabbix 奈何网上的教程和现实出现不一样的情况 在安装zabbix过程中,因为zabbix下载源是在国外,下载途中会出现终止下载的情况 tr ...
- Python更换国内源实现快速PIP安装
WINDOWS 安装pip 1.首先下载安装Python,并将python的安装目录添加进系统环境变量 2.复制这个文件保存为.py并执行 https://bootstrap.pypa.io/get- ...
- python pip国内源
pip国内的这个源最快 清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/ 修改源方法: 临时使用: 可以在使用pip的时候在后面加上-i参数,指定pip ...
- ubuntu 16.04 国内源安装docker
1. 通过curl命令安装 检查是否安装curl root@ros-OptiPlex-3050:~# which curlroot@ros-OptiPlex-3050:~# 更新安装 root@ros ...
- (原+修改)Pip使用国内源安装opencv
转载请注明出处: https://www.cnblogs.com/darkknightzh/p/12000823.html 参考网址: https://www.imooc.com/article/34 ...
- debian10使用国内源安装docker以及一些使用方法
首先, 我的环境是debian, 容器是centos debian 安装添加新存储库所需的依赖项 1 sudo apt install ca-certificates curl software-pr ...
- jenkins 2.204.2 安装, 使用国内源安装, 并且跳过插件界面, 更新成国内插件源.
需要java环境支持,自行百度. jenkins 安装源在国外, 下载会比较慢, 尤其在linux下, 使用yum或者apt install jenkins方式安装时,经常会下载失败. 由于yum或者 ...
随机推荐
- [洛谷P2463][SDOI2008]Sandy的卡片
题目大意:有$n$个字符串,求这$n$个字符串中最长的相似公共字串,相似的定义是加上一个数后相同 题解:差分,建广义后缀自动机,然后求出每个点在多少个字符串中出现过,若在$n$个中都出现,就更新答案 ...
- US Open 2016 Contest
比较弱,只写了金组和银组,铂金组的第一题. [262144] http://www.usaco.org/index.php?page=viewproblem2&cpid=648 给一个序列,相 ...
- Codeforces Round #469 (Div. 2) E. Data Center Maintenance
tarjan 题意: 有n个数据维护中心,每个在h小时中需要1个小时维护,有m个雇主,他们的中心分别为c1,c2,要求这两个数据中心不能同时维护. 现在要挑出一个数据中心的子集,把他们的维护时间都推后 ...
- POJ3621:Sightseeing Cows——题解
http://poj.org/problem?id=3621 全文翻译参自洛谷:https://www.luogu.org/problemnew/show/P2868 题目大意:一个有向图,每个点都有 ...
- POJ1375:Intervals——题解
http://poj.org/problem?id=1375 题目大意:有一盏灯,求每段被圆的投影所覆盖的区间. —————————————————————— 神题,卡精度,尝试用各种方法绕过精度都不 ...
- MySQL基础原创笔记(一)
对表的增删改操作: 创建表: create table student ( id int primary key auto_increment, name ...
- mysql语句进阶
1.null mysql> create table worker(id int not null,name varchar(8) not null,pass varchar(20) not n ...
- POJ2349:Arctic Network(二分+最小生成树)
Arctic Network Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 28311 Accepted: 8570 题 ...
- stout代码分析之十一:hashmap和multihashmap
hashmap是std::unordered_map的子类,前者对后者的接口做了进一步封装. hashmap的移动构造函数: hashmap(std::map<Key, Value>&am ...
- 其他:OI竞赛中的文件操作
本文介绍三种方法进行文件输入输出,都非常实用 第一种方法是采用重定向的形式进行输入输出,很方便 freopen("input.txt","r",stdin); ...
