如何创建本地pypi镜像?
Posted
技术标签:
【中文标题】如何创建本地pypi镜像?【英文标题】:How to create a local pypi mirror? 【发布时间】:2018-05-08 23:22:46 【问题描述】:我想按照web教程创建本地pypi镜像。set local pypi mirror
这是我的方式。
wget https://bootstrap.pypa.io/get-pip.py
sudo python2.7 get-pip.py
sudo pip2.7 install pep381client
mkdir mirror
pep381run /tmp/mirror
此处出现错误信息:
Traceback (most recent call last):
File "/usr/local/bin/pep381run", line 23, in <module>
state = pep381client.Synchronization.initialize(targetdir)
File "/usr/local/lib/python2.7/dist-packages/pep381client/__init__.py", line 96, in initialize
status.projects_to_do = set(xmlrpc().list_packages())
File "/usr/lib/python2.7/xmlrpclib.py", line 1243, in __call__
return self.__send(self.__name, args)
File "/usr/lib/python2.7/xmlrpclib.py", line 1602, in __request
verbose=self.__verbose
File "/usr/lib/python2.7/xmlrpclib.py", line 1283, in request
return self.single_request(host, handler, request_body, verbose)
File "/usr/lib/python2.7/xmlrpclib.py", line 1331, in single_request
response.msg,
xmlrpclib.ProtocolError: <ProtocolError for pypi.python.org/pypi: 403 Must access using HTTPS instead of HTTP>
【问题讨论】:
【参考方案1】:pep381client
似乎已经过时了(最后一次更新是在 2011 年)。你需要更新鲜的东西,比如devpi
或pypi-server
。
【讨论】:
以上是关于如何创建本地pypi镜像?的主要内容,如果未能解决你的问题,请参考以下文章