搭建pypi私有倉庫實現過程詳解
1. 安裝依賴
pip install pypiserver passlib
2. 創(chuàng)建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]
以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持腳本之家。
相關文章
Python for Informatics 第11章之正則表達式(二)
這篇文章主要介紹了Python for Informatics 第11章 正則表達式(二)的相關資料,需要的朋友可以參考下2016-04-04
Python連接MySQL并使用fetchall()方法過濾特殊字符
這篇文章主要介紹了Python連接MySQL的方法并講解了如何使用fetchall()方法過濾特殊字符,示例環(huán)境為Ubuntu操作系統(tǒng),需要的朋友可以參考下2016-03-03

