Python virtualenv 使用国内pip/easy_install创建虚拟环境
2014-03-31 21:35
1316 查看
Virtualenv Docs
在使用Virtualenv创建虚拟开发环境时,经常因为网络原因,在安装Installing setuptools…… 和 Installing pip…… 时等待超时。
为解决此问题需要配置pip/easy_install国内pypi镜像。
pip Docs
pip 配置文件中添加(不存在则创建)
On Unix and Mac OS X the configuration file is: $HOME/.pip/pip.conf
On Windows, the configuration file is: %HOME%\pip\pip.ini
easy_install Docs
easy_install 配置文件中添加(不存在则创建)
On Unix and Mac OS X the configuration file is: $HOME/.pydistutils.cfg
On Windows, the configuration file is: %HOME%\pydistutils.cfg
最后在运行virtualenv时加入 --extra-search-dir=SEARCH_PATH 选项,可以搜索本地site-package,加速setuptools安装。
在使用Virtualenv创建虚拟开发环境时,经常因为网络原因,在安装Installing setuptools…… 和 Installing pip…… 时等待超时。
为解决此问题需要配置pip/easy_install国内pypi镜像。
pip Docs
pip 配置文件中添加(不存在则创建)
On Unix and Mac OS X the configuration file is: $HOME/.pip/pip.conf
On Windows, the configuration file is: %HOME%\pip\pip.ini
[global] find-links=http://pypi.douban.com/simple [instal] find-links= http://pypi.douban.com/simple http://pypi.v2ex.com/simple
easy_install Docs
easy_install 配置文件中添加(不存在则创建)
On Unix and Mac OS X the configuration file is: $HOME/.pydistutils.cfg
On Windows, the configuration file is: %HOME%\pydistutils.cfg
[easy_install] index-url=http://pypi.douban.com/simple find-links= http://pypi.douban.com/simple http://pypi.v2ex.com/simple
最后在运行virtualenv时加入 --extra-search-dir=SEARCH_PATH 选项,可以搜索本地site-package,加速setuptools安装。
python virtualenv.py --extra-search-dir=/User/my/local/site-package/ <your_env_name>
相关文章推荐
- python脚本
- 【Python】Python小知识001
- python:利用asyncio进行快速抓取
- python基础学习笔记
- python处理XML文件
- 004_018 Python 添加 修改一系列已经命名的参数 用于搜集一系列元素,然后重命名
- Python入门教程-01 环境搭建
- Python正则小实例
- OSINT + Python = 自定义黑客
- 004_017 Python 查找2个字典的交集和并集 指的是键
- python 遍历 字典
- python 星号
- RFC3261 python源码分析 2
- [python]字符串方法
- 【Python排序搜索基本算法】之插入排序
- BAE3.0部署Python + Django + MySQL
- Exercise 31:做出决定
- django python html checkbox
- Python base64模块详解
- 解决python3 UnicodeEncodeError: 'gbk' codec can't encode character '\xXX' in position XX