python - How can I make `pip search` work with my local pypi server? -


i have bunch of machines isolated internet, , have access services on local network.

i want users using machines able search , install whatever python libraries want local pypi server. therefore created global pip.conf under /etc/ contains following lines:

[global] trusted-host = my.pypi-server.com index-url = https://my.pypi-server.com/ 

this works when name of library known , run pip install fancy-lib. however, when searching package, pip seems ignore index-url:

$  pip search fancy-lib -vvvv starting new https connection (1): pypi.python.org  $  pip install fancy-lib -vvvv collecting fancy-lib   1 location(s) search versions of fancy-lib:   * https://my.pypi-server.com/simple/fancy-lib   getting page https://my.pypi-server.com/simple/fancy-lib   looking "https://my.pypi-server.com/simple/fancy-lib" in cache   no cache entry available   starting new https connection (1): https://my.pypi-server.com/ 

how can make pip search work local pypi server?

it seems matter of rtm. search index independent install one, , specified using index:

[global] trusted-host = my.pypi-server.com index = https://my.pypi-server.com/ index-url = https://my.pypi-server.com/ 

an alternative config file be:

[global] trusted-host = my.pypi-server.com  [search] index = https://my.pypi-server.com/  [install] index-url = https://my.pypi-server.com/ 

this not intuitive, , there enhancement request open address it: https://github.com/pypa/pip/issues/4263


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -