【人生苦短,我学Python】个人学习笔记——设置pip和easy_install使用指定源,,最近在学习编写 se
【人生苦短,我学Python】个人学习笔记——设置pip和easy_install使用指定源,,最近在学习编写 se
最近在学习编写 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.iomy_svr="test.io"cat > ~/.pydistutils.cfg << EOF[easy_install]index-url = http://${my_svr}/pypi/web/simple/EOFmkdir -p ~/.pip/cat > ~/.pip/pip.conf << EOF[global]index-url = http://${my_svr}/pypi/web/simple/trusted-host = ${my_svr}EOF
【人生苦短,我学Python】个人学习笔记——设置pip和easy_install使用指定源
相关内容
- 【python+selenium自动化】使用pytest+allure2完成自动化测试
- Python:查看矩阵大小,查看列表大小,python矩阵,对于
- 如何查找python安装包的路径site-packages?,,使用命令:
- 用python + hadoop streaming 编写分布式程序(三) -- 自定义
- python request 接口测试get和post请求,pythonrequest,开发IDE:
- [XPath/Python] XPath 与 lxml (二)XPath 语法,,XPath 选取节点
- Python、编译解释、动态库静态库、编译过程、头文件了
- Python语法特点之代码缩进,,Python不像其他
- Python图表数据可视化Seaborn:4结构化图表可视化,,1.基
- python==使用smtp发送邮件的源代码,解决554错误码的问题
评论关闭