搭建pypi私有仓库实现过程详解
作者:-零 时间:2023-02-02 09:14:35
1. 安装依赖
pip install pypiserver passlib
2. 创建packages目录
mkdir packages
3. 以无认证方式启动pypiserver
pypi-server -p 8080 -P . -a . ./packages
4. 编写.pypirc配置文件
[distutils]
index-servers =
pypi
local[pypi]
username:xxx
password:xxxx[local]
repository:http://localhost:8080
username:
password:
5. 上传到私有pypi服务
使用setuptools上传
python setup.py sdist bdist_wheel upload -r local
使用twine上传
twine upload -r local dist/*
安装
首先修改.pip.ini配置文件如下:
[global]
index-url=https://pypi.douban.com/simple
extra-index-url=
http://localhost:8080/simple/
https://mirrors.aliyun.com/pypi/simple/
https://mirrors.cloud.tencent.com/pypi/simple
https://pypi.tuna.tsinghua.edu.cn/simple/
https://pypi.doubanio.com/simple/
https://mirrors.163.com/pypi/simple/[install]
trusted-host=
localhost:8080
pypi.douban.com
mirrors.aliyun.com
mirrors.cloud.tencent.com
pypi.tuna.tsinghua.edu.cn
pypi.doubanio.com
mirrors.163.com
安装
pip install [package-name]
来源:https://segmentfault.com/a/1190000023759016
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
python实现布隆过滤器及原理解析
![](https://img.aspxhome.com/file/2023/5/131675_0s.jpg)
使用pandas对矢量化数据进行替换处理的方法
python基于property()函数定义属性
Firefox 3.5 新增加的支持(整理)
利用phpexcel对数据库数据的导入excel(excel筛选)、导出excel
jQuery使用手册--核心篇(Core)
MySQL 5.0默认100连接数的修改
python异常的传递知识点总结
pycharm远程调试openstack的图文教程
![](https://img.aspxhome.com/file/2023/6/87966_0s.png)
python实现简单学生信息管理系统
![](https://img.aspxhome.com/file/2023/0/112750_0s.jpg)
Python+NumPy绘制常见曲线的方法详解
![](https://img.aspxhome.com/file/2023/3/99233_0s.png)
查看ASP详细错误提示信息的图文设置方法
![](https://img.aspxhome.com/file/UploadPic/20112/5/20112511339472s.jpg)
Python中三种时间格式转换的方法
![](https://img.aspxhome.com/file/2023/2/100932_0s.png)
Python采集猫眼两万条数据 对《无名之辈》影评进行分析
![](https://img.aspxhome.com/file/2023/3/131723_0s.png)
python代码实现猜拳小游戏
![](https://img.aspxhome.com/file/2023/3/63593_0s.jpg)
Python序列化模块JSON与Pickle
python使用sqlite3时游标使用方法
Flask wtforms实现表单验证使用
分类、属性、关键词与Tag
教你如何使用Python实现二叉树结构及三种遍历
![](https://img.aspxhome.com/file/2023/1/133321_0s.png)