Skip to content

Instantly share code, notes, and snippets.

@bunchc
Created August 2, 2017 03:30
Show Gist options
  • Save bunchc/7ba38f0ce1a735101121f055d6200c21 to your computer and use it in GitHub Desktop.
Save bunchc/7ba38f0ce1a735101121f055d6200c21 to your computer and use it in GitHub Desktop.
(┛◉Д◉)┛彡┻━┻

pip install sometimes calls setup.py, which makes it ignore the offline params you specified for pip. To get around that, you need to create a file ~/.pydistutils.cfg

This will create said file:

echo -e '[easy_install]\nallow_hosts = 10.10.120.20\nfind_links = http://10.10.120.20/pypi/simple\nindex-url = http://10.10.120.20/pypi/simple' | tee ~/.pydistutils.cfg

The file looks like this:

[easy_install]
allow_hosts = 10.10.120.20
find_links = http://10.10.120.20/pypi/simple
index-url = http://10.10.120.20/pypi/simple
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment