【人生苦短,我学Python】个人学习笔记——设置pip和easy_install使用指定源
2017-11-27 19:57
686 查看
最近在学习编写 setup.py ,同时有一个内部pypi源,希望用内部源而不是默认源。
在stackoverflow搜索到了,贴过来备忘。
方法如下:
# Add the following to ~/.pydistutils.cfg for easy_install [easy_install] index_url = http://localhost:8000/ # Add the following to ~/.pip/pip.conf for pip [global] index-url = http://localhost:8000/
注:index_url 的值无需任何引号
将 index-url的值替换为所需的内部原地址即可,格式: http://${your_pip_server}/pypi/web/simple/
再多写个shell命令吧,以后用到就直接拷贝执行了:
# 这里假设服务器地址为 test.io my_svr="test.io" cat > ~/.pydistutils.cfg << EOF [easy_install] index-url = http://${my_svr}/pypi/web/simple/ EOF mkdir -p ~/.pip/ cat > ~/.pip/pip.conf << EOF [global] index-url = http://${my_svr}/pypi/web/simple/ trusted-host = ${my_svr} EOF
相关文章推荐
- python学习笔记--easy_install和pip
- python3.4学习笔记(十六) windows下面安装easy_install和pip教程
- python3.4学习笔记(十六) windows下面安装easy_install和pip教程
- python学习笔记(十三) - easy_install安装与使用
- pip 和 easy_install 区别,以及使用python 的虚拟环境
- 【人生苦短,我学Python】个人学习笔记——str.count方法
- 【Python学习笔记】macosx 10.11 python pip install 出现错误OSError: [Errno 1] Operation not permitted:
- easy_install 和pip安装软件时使用指定的 源地址
- Python中函数参数设置及使用的学习笔记
- 《Python网络编程》Part3 Win7系统下使用easy_install和pip安装python的包
- python笔记 - 配置Linux环境 easy_install的安装及使用
- pip和easy_install的使用对比,python库文件安装方法
- Python环境变量PYTHONPATH设置和easy_install简单使用
- python2.7无法使用pip的解决方法(安装easy_install)
- 【Python错误】windows下使用pip/easy_install提示Fatal error in launcher: Unable to create process using...
- Python环境变量PYTHONPATH设置和easy_install简单使用
- python3学习(一) windows下面安装easy_install和pip教程
- 使用pip install 或者easy_install安装Python的各种包出现cc failed with exit status 1
- python学习笔记_easy_install
- Python环境变量PYTHONPATH设置和easy_install简单使用