question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

setuptools 42.0.0 breaks with allow-hosts set globally

See original GitHub issue

The error message is: distutils.errors.DistutilsError: the allow-hosts option is not supported when using pip to install requirements.

However, it’s not even pip being used: python3 setup.py sdist bdist_wheel --universal (see my next comment for why strikethrough)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (11 by maintainers)

github_iconTop GitHub Comments

3reactions
jmrootcommented, Dec 7, 2019

There are also configurations setting allow_hosts = None to prevent automatic download of dependencies altogether. It looks as though this use case is also broken.

1reaction
SomberNightcommented, Dec 11, 2020

There are also configurations setting allow_hosts = None to prevent automatic download of dependencies altogether. It looks as though this use case is also broken.

Indeed, this is our use case as well.

Also note that the pip docs still include this approach for this use case, see https://pip.pypa.io/en/stable/reference/pip_install/#controlling-setup-requires

To have the dependency located from a local directory and not crawl PyPI, add this:

[easy_install]
allow_hosts = ''
find_links = file:///path/to/local/archives/

related: https://github.com/pypa/pip/issues/410


Anyway, for this use case (hard-failing if setuptools tries to access PyPI), this still works:

[easy_install]
index_url = ''
find_links = ''
Read more comments on GitHub >

github_iconTop Results From Across the Web

setuptools 4.0 - PyPI
Easily download, build, install, upgrade, and uninstall Python packages.
Read more >
all-hosts options is not supported when using pip
Octavia is failing to install due to: distutils.errors.DistutilsError: the `allow-hosts` option is not supported when using pip to install ...
Read more >
Running setuptools commands - Python Packaging Authority
For example, this command defines a sitewide alias called “daily”, that sets various egg_info tagging options: setup.py alias --global-config daily egg_info ...
Read more >
setuptools Changelog - pyup.io
Breaking Changes ^^^^^^^^^^^^^^^^ * 2896: Setuptools once again makes its local copy of distutils the default. To override, set ...
Read more >
How can I get the version defined in setup.py (setuptools) in ...
Besides, who is going to release broken code? If the package needs dependencies use setuptools or wait for the release of distutils2 later...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found