I have tried to setup a private pypi-server running on a Windows 11 box on a private network.
I setup the following:
python 3.9.1
pypi-server 1.5.1
pip 20.2.3
pip.ini in C:\ProgramData\pip
pip.ini contents:
[global]
extra-index-url = http://<host>:8080/simple/
trusted-host = <host>
tried running server with following command-lines:
pypi-server run ~/packages
pypi-server run ~/packages &
pypi-server run c:\Users\bmckenzie\packages
pypi-server run c:\Users\bmckenzie\packages &
plus all with combinations of -i <host> -p 8080, just the host, just the port, using localhost for host, not specifying host or port (they are in the pip config anyway)
surfed to http://<ip address> in browser and got the pypi-server splash page correctly
surfed to http://<ip address>/simple/ in browser and see the couple of python packages I put in my packages folder
From command-line, the following works and returns proper version number,
pypi-server --version
Windows firewall has been completely disabled
netstat shows python listening on port 8080
But, trying to pip install anything leads to a Win-Error 10061
I have tried Googling this problem, but it seems to always boil down to a firewall problem, lack of active listener on the port, or the pypi-service not running, none of which is my problem. It looks to me like pypi-service doesn't work on Windows or I am starting it wrong?
Anyone have a clue what I can try?
Aha! The issue is the pip.ini. This line:
extra-index-url = http://<host>:8080/simple/
should be this:
index-url = http://<host>:8080/simple/
That allows it all to work correctly. Btw, the -v (verbose) flags in pip and pypi-server were very helpful in figuring out the problem.