pip 使用国内源
常用国内的pip源如下:
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
临时使用直接 -i 加 url :
pip install web.py -i http://pypi.douban.com/simple
如果有如下报错:
请使用命令信任域名:
pip install web.py -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
配置成默认源的方法如下:
需要创建或修改配置文件(一般都是创建),
linux的文件在~/.pip/pip.conf,
windows在%HOMEPATH%\pip\pip.ini),
修改内容为:
[global]
index-url = http://pypi.douban.com/simple
[install]
trusted-host=pypi.douban.com
这样在使用pip来安装时,会默认调用该镜像。
临时使用其他源安装软件包的python脚本如下:
#!/usr/bin/python
import os
package = raw_input("Please input the package which you want to install!\n")
command = "pip install %s -i http://pypi.mirrors.ustc.edu.cn/simple --trusted-host pypi.mirrors.ustc.edu.cn" % package
os.system(command)
pip 使用国内源的更多相关文章
- dockerfile debian 和pip使用国内源
python官方镜像是基于debian的.国内使用时定制一下,加快下载速度. 1 debian本身使用国内源 dockfile中: #国内debian源 ADD sources.list /etc/a ...
- pip换国内源
pip换国内源 1.国内常用源 阿里云 http://mirrors.aliyun.com/pypi/simple/ 中国科技大学 https://pypi.mirrors.ustc.edu. ...
- linux pip使用国内源
最近在Linux里面使用pip安装应用的速度十分的慢,于是便上网找了一些国内的源. 清华大学:https://pypi.tuna.tsinghua.edu.cn/simple 阿里云:https:// ...
- pip使用国内源
对于Python开发用户来讲,PIP安装软件包是家常便饭.但国外的源下载速度实在太慢,浪费时间.而且经常出现下载后安装出错问题.所以把PIP安装源替换成国内镜像,可以大幅提升下载速度,还可以提高安装成 ...
- pip 设置国内源
最近使用 pip 安装包,动辄十几 k 甚至几 k 的下载速度,确实让人安装的时候心情十分不好.所以还是要给 pip 换一个国内的源.可以显著的提升安装速度.有更多的时间来研究算法. 下面,列一下收集 ...
- Python pip配置国内源
众所周知,Python使用pip方法安装第三方包时,需要从 https://pypi.org/ 资源库中下载,但是会面临下载速度慢,甚至无法下载的尴尬,这时,你就需要知道配置一个国内源有多么重要了,通 ...
- pip更改国内源
国内源: 阿里云 http://mirrors.aliyun.com/pypi/simple/中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/豆瓣(dou ...
- pip 设置国内源提高速度
临时使用: 可以在使用pip的时候加参数-i https://pypi.tuna.tsinghua.edu.cn/simple 例如:pip install -i https://pypi.tuna. ...
- pip/pip3国内源
Error 在使用pip3安装PySide2时出现ReadTimeoutError. $ pip3 install PySide2 Solution 使用国内源 例如: $ pip3 install ...
- pip使用国内源的配置方法
[root@ ~]# cat ~/.pip/pip.conf [global] index-url = https://pypi.douban.com/simple
随机推荐
- HDU1209:Clock
参考:https://blog.csdn.net/libin56842/article/details/8990530 https://blog.csdn.net/u011479875/article ...
- [Cracking the Coding Interview] 4.6 Successor 后继节点
Write an algorithm to find the 'next' node(i.e. in-order successor) of a given node in a binary sear ...
- Python3全栈学习目录
http://www.cnblogs.com/wupeiqi/articles/4938499.html 文辉整理: http://blog.51cto.com/9272317/1869914
- c++ combination by next_permutation
#include <iostream> #include <algorithm> #include <vector> int main() { int n, r; ...
- jenkins手动安装插件
插件下载地址: 搜索:https://plugins.jenkins.io/ 列表:https://updates.jenkins-ci.org/download/plugins/ 打开jenkins ...
- Qt BarChart实践
按照帮助文档编写 运行截图 上代码 #include "widget.h" #include "ui_widget.h" Widget::Widget(QWid ...
- 虚拟现实-VR-UE4-创建第一个C++项目——Hello word
这部分主要是调用在C++中用代码实现在游戏界面上面输出一行文字 第一步,新建C++版本的工程文件,在4.12版本以后,在创建后,都会自动打开Vs编译器. 如下图 在VS中点击编译,等带编译,第一次等待 ...
- 第四篇 Python循环
While 循环 For 循环
- python------- IO 模型
IO模型介绍 ...
- 问题 A: a+b
问题 A: a+b 时间限制: 1 Sec 内存限制: 32 MB提交: 285 解决: 124[提交][状态][讨论版][命题人:外部导入] 题目描述 实现一个加法器,使其能够输出a+b的值. ...