如何创建本地pypi镜像?

时间:2017-11-25 01:23:55

标签: python pypi mirror

我想根据网络教程创建一个本地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>

如何创建本地pypi镜像?

1 个答案:

答案 0 :(得分:2)

pep381client似乎已经过时了(2011年最后一次更新)。您需要更新鲜的内容,例如devpipypi-server