[Python] pip国内源
来源:互联网 发布:电脑特效软件 编辑:程序博客网 时间:2024/06/05 00:25
默认源已经没爹疼没娘爱了
http://www.cnblogs.com/sunnydou/p/5801760.html
一些国内的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 -i http://pypi.douban.com/simple numpy
如果想配置成默认的源,方法如下:
需要创建或修改配置文件(一般都是创建),
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/pythonimport ospackage = 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" % packageos.system(command)
阅读全文
0 0
- python pip 国内源
- python pip 国内源
- [Python] pip国内源
- python pip使用国内源
- python笔记---pip 更换国内源
- python更新pip国内下载源
- 【Python】pip 国内镜像源
- python pip国内镜像
- pip 配置python国内镜像源
- 配置pip国内源
- pip国内源
- pip 国内源提速
- pip国内源
- PIP国内源
- pip更换国内源
- pip 国内源
- pip 最新国内源
- 三个国内pip源
- 10.12
- poj 1067 取石子游戏(威佐夫博弈)
- 天弘基金移动App客户端架构优化之路
- Okhttp简单的二次封装
- 【Python】将Linux 上的Python2.7 升级成Python3.6
- [Python] pip国内源
- Cron表达式详解
- 微信Android客户端架构演进之路
- bzoj1864 [Zjoi2006]三色二叉树 树上DP
- 焦点
- 洛谷 P2013 无线电测向
- 作业10.12
- Event对象
- 电子邮件的工作过程