##### 国内镜像源 #####
# 清华:https://pypi.tuna.tsinghua.edu.cn/simple/
# 阿里云:http://mirrors.aliyun.com/pypi/simple/
# 中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
# 华中理工大学:http://pypi.hustunique.com/
# 山东理工大学:http://pypi.sdutlinux.org/
# 豆瓣:http://pypi.douban.com/simple/
使用方式一(临时):
pip install -i 镜像地址 模块
会从指定的镜像地址安装模块
使用方式二(永久):
Linux:
在~目录创建.pip/pip.conf
~~~
cd ~
mkdir .pip
vim pip.conf
~~~
在打开的pip.conf中加入,wq保存退出即可
~~~
[global]
index-url = https://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com
~~~
Windows:
在用户目录即C:\user/xxx/目录中创建pip文件夹,不带. ,在文件夹中创建pip.ini,打开pip.ini,加入
~~~
[global]
index-url = https://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com
~~~
Docker:
在Dockerfile文件中增加以下配置:
```
# Set pip repolist
RUN mkdir /root/.pip
COPY pip.conf /root/.pip/
```
创建pip.conf,打开pip.conf,加入
```
[global]
index-url = https://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com
```
设置pyenv加速,比如安装Python 3.7.9
从阿里云下载Python
`wget https://npm.taobao.org/mirrors/python/3.7.9/Python-3.7.9.tar.xz -P ~/.pyenv/cache`
再次安装,可以看到命令行窗口打印内容更改为Installing,解决下载速度慢的问题。
`pyenv install 3.7.9`
- python setup.py install报错
- from future import absolute_import 的使用
- celery 4以上的版本不支持windows解决办法
- 'ascii' codec can't decode byte 0xe4 in position 0: ordinal not in range(128)
- Python开发环境CentOS
- dosh-to-dock启动报错
- 创建了__init__.py文件,找不到模块
- CentOS切换中文输入法
- vncserver:1非正常中断后启动不来
- CentOS7安装搜狗输入法
- 安装第三方包常见报错
- Django for Professionals
- Chapter 1:Docker
- What is Docker?
- Containers vs. Virtual Environments
- Install Docker
- Docker Hello, World
- Django Hello, World
- Pages App
- Images, Containers, and the Docker Host
- Git
- Conclusion
- 设置pip/pyenv国内加速源
- 使用stackedit在github编辑文档
- python2.x与python3.x的区别
- python多任务实现
- python执行Linux命令的方法