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:
```Collecting tenacity<5.0.0dev,>=4.0.0 (from google-cloud-core<0.27dev,>=0.26.0->google-cloud)
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 "
File "/private/var/folders/3r/y9rhgvvn1k9516sy_qj9p5m0g3s721/T/pip-build-QVdL3t/tenacity/setup.py", line 20, in
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/
~Can you pip install --upgrade setuptools and see if that helps?~
Nevermind, that is my canned response to this stuff, but seems to be unrelated to your issue.
This looks like an issue with your company proxy. pbr exists on PyPI, and there is not a whole lot we can do for you if you are unable to pull down dependencies. Sorry. :-/
You could also try setting the HTTP_PROXY and HTTPS_PROXY if you haven't already https://www.jacobtomlinson.co.uk/2014/11/25/easy-install-and-pip-through-a-proxy/
Hey, I can actually hit the pbr site on my browser, if that's the case could I download the pbr package somewhere and have pip continue using that?
I think it is a proxy issue though so I'm continuing to try to figure out my proxy settings. Thanks!
Yep - you can download the source distribution (zip) and just pip install zip then try re-installing these packages.
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!
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.
Another debugging tip: check the traceback for which Python is trying to install setuptools_scm, because it may be different than the Python in your path. In my case it was homebrew, pip, and Anaconda colliding. Uninstalling & reinstalling things and then restarting iTerm fixed it for me.
My traceback had pip using easy_install but installing with pip shows that the package is already satisfied D:
It's happening during a spacy installation with Requirement.parse('wheel<0.33.0,>=0.32.0') of all things
To fix your problem I think that you can tap the command
pip install pbr
I had the same problem
@ladinstar i am having the same issue while installing rpy2 library.
I installed pbr but still no luck.
or you could use a virtual environment to get around library conflicts
@Ladinstar i am having the same issue while installing rpy2 library.
I installed pbr but still no luck.
Same, not working for installing matplotlib
Most helpful comment
Well interesting enough I managed to get past the issue by doing
pip install pbrand 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!