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.

Failing pip install: distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pbr')

See original GitHub issue

Currently having trouble trying to pip install google-cloud on my Mac. As soon as it gets to trying to install tenacity it runs into issues.

OS: OS X Sierra 10.12.6. Python Version: 2.7.13 Pip version: 9.0.1 setuptools version: 36.2.7

Under company proxy but added proxy parameter and have installed other python packages using pip.

Stacktrace here:

  Using cached tenacity-4.4.0.tar.gz
    Complete output from command python setup.py egg_info:
    Download error on https://pypi.python.org/simple/pbr/: [Errno 65] No route to host -- Some packages may not be found!
    Couldn't find index page for 'pbr' (maybe misspelled?)
    Download error on https://pypi.python.org/simple/: [Errno 65] No route to host -- Some packages may not be found!
    No local packages or working download links found for pbr
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/3r/y9rhgvvn1k9516sy_qj9p5m0g3s721/T/pip-build-QVdL3t/tenacity/setup.py", line 20, in <module>
        pbr=True)
      File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 111, in setup
        _setup_distribution = dist = klass(attrs)
      File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/dist.py", line 325, in __init__
        self.fetch_build_eggs(attrs['setup_requires'])
      File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/dist.py", line 446, in fetch_build_eggs
        replace_conflicting=True,
      File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/__init__.py", line 855, in resolve
        dist = best[req.key] = env.best_match(req, ws, installer)
      File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1127, in best_match
        return self.obtain(req, installer)
      File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1139, in obtain
        return installer(requirement)
      File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/dist.py", line 518, in fetch_build_egg
        return cmd.easy_install(req)
      File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 666, in easy_install
        raise DistutilsError(msg)
    distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pbr')
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/3r/y9rhgvvn1k9516sy_qj9p5m0g3s721/T/pip-build-QVdL3t/tenacity/ 

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

39reactions
RjLi13commented, Aug 8, 2017

Well interesting enough I managed to get past the issue by doing pip install pbr and installing that dependency separately, then continuing my install of google-cloud. Not sure why it couldn’t hit the pbr website when installing google-cloud, but whatever!

21reactions
LorensKcommented, Sep 18, 2018

For the information of other people who may happen on the problem (this page is top-ranked on google for “distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse”: when running pip install, the installation of second-level requirements may be done by an older method with different behavior (easy_install) than the primarily requested packages. Look above your error “Traceback” for confirmation of the different behavior and just above the DistutilsError for a mention of easy_install.

If this is indeed the problem, then doing an explicit pip install of the not-found packages will solve it. Adding the package to the top of requirements.txt may be a useful workaround.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python 3.x - DistutilsError: Could not find suitable distribution ...
... to elastic beanstalk this error shows up, DistutilsError: Could not find suitable distribution for Requirement.parse('setuptools-scm').
Read more >
Intermittent distutils.errors.DistutilsError: Could not find ...
This looks like the same problem as bug 1449350 where pip fails to find the dependency "six" for txws. I tried manually installing...
Read more >
Could not find suitable distribution for Requirement.parse('six ...
parse ('six>=1.9') ERROR: python setup.py install execution failed. When I try to install six , I see the following issues $pip install six ......
Read more >
dev-python/testresources-2.0.1 : distutils.errors.DistutilsError
DistutilsError : Could not find suitable distribution for Requirement.parse('pbr>=1.3') * ERROR: dev-python/testresources-2.0.1::gentoo ...
Read more >
Bug #1245916 ""Could not find suitable distribution” whereas ...
When I run tests with ceilometer for instance : pbr seems installed correctly the firstime but when it's time to install 'stevedore', pbr...
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