how to setup devpi-server for pypi pip searching

3.7k Views Asked by At

I am using a a devpi-server to locally cache and install pypi packages using pip. However when I search for packages using the devpi server I get the following error:

pypi.xyz.com is the name of the server

ProtocolError: <ProtocolError for pypi.xyz.com:33141/root/pypi/+simple/: 405 Method Not Allowed>

Note that install work just fine

Edit: I am using a proxy that is allowed to access pypi.xyz.com by setting http_proxy before calling the pip command. The proxy is working fine and allows access to the pypi.xyz.com server as you can run the pip install commands without any trouble.

pip.conf:

[global]

[install]
index-url = http://pypi.xyz.com:33141/root/pypi/+simple/

[search]
index = http://pypi.xyz.com:33141/root/pypi/+simple/

Adding the clarifications requested by @JanVlcinsky: 1. Installed devpi using pypi 2. None of the default settings were modified except the port change 3. Protocol Error is in the console when I use pip with the following environment variable set

export http_proxy=http://localhost:33128
  1. Changed port to 33141 Just for some obfuscation security, try to avoid using defaults
  2. It is an http_proxy (running locally using squid)
1

There are 1 best solutions below

0
On

You can find the answer in the "using pip search" section of the official doc:

pip install -q -U devpi-web
devpi-server --stop
devpi-server --recreate-search-index
devpi-server --start