Can't install google-api-python-client using pip
I want to install google-api-python-client using pip. I can see it when I search from the command line: % pip-2.7 search google | egrep google-api google-api-python-client - Google API Client Library for Python google-apitools - client libraries for humans google-api-python-client-py3 - Google API Client Library for Python (python 3x port) google-apis-client-generator - Google Apis Client Generator I can see it in PyPI: When I try to install it, pip denies any knowledge of the package: % pip-2.7 install --user google-api-python-client Downloading/unpacking google-api-python-client Cannot fetch index base URL http://pypi.python.org/simple/ Could not find any downloads that satisfy the requirement google-api-python-client No distributions at all found for google-api-python-client Storing complete log in /Users/skip/.pip/pip.log I can visit http://pypi.python.org/simple/ and see that google-api-python-client is one of the links. Looking at pip.log I see that it's somehow translating "http" into "https": Could not fetch URL http://pypi.python.org/simple/google-api-python-client/: <urlopen error unknown url type: https> Am I missing something? Thx, Skip Montanaro
On May 3, 2015, at 5:21 PM, Skip Montanaro <skip.montanaro@gmail.com> wrote:
I want to install google-api-python-client using pip. I can see it when I search from the command line:
% pip-2.7 search google | egrep google-api google-api-python-client - Google API Client Library for Python google-apitools - client libraries for humans google-api-python-client-py3 - Google API Client Library for Python (python 3x port) google-apis-client-generator - Google Apis Client Generator
I can see it in PyPI:
<Screen Shot 2015-05-03 at 4.16.16 PM.png> When I try to install it, pip denies any knowledge of the package:
% pip-2.7 install --user google-api-python-client Downloading/unpacking google-api-python-client Cannot fetch index base URL http://pypi.python.org/simple/ <http://pypi.python.org/simple/> Could not find any downloads that satisfy the requirement google-api-python-client No distributions at all found for google-api-python-client Storing complete log in /Users/skip/.pip/pip.log
I can visit http://pypi.python.org/simple/ <http://pypi.python.org/simple/> and see that google-api-python-client is one of the links. Looking at pip.log I see that it's somehow translating "http" into "https":
Could not fetch URL http://pypi.python.org/simple/google-api-python-client/ <http://pypi.python.org/simple/google-api-python-client/>: <urlopen error unknown url type: https>
Am I missing something?
Well, PyPI redirects HTTP to HTTPS, so it’s going to be just following that redirect. --- Donald Stufft PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
On Mon, May 4, 2015 at 8:05 AM, Skip Montanaro <skip.montanaro@gmail.com> wrote:
Hmmm... This morning this is working. I'm mystified.
Actually, I should rephrase that. This morning this is working from my Linux machine at work. Yesterday I was twiddling bits from my Mac laptop more-or-less at home. I say, "more-or-less", because we are in a sublet for a bit and I was using the apartment building's "business center" to get on the net. I will have to try it from somewhere else with my laptop and see if it behaves differently. Skip
In article <CANc-5UzPr1+Pw3nsq38RaPr1bvxV7hktz6ftRX3V_moCgc3y4A@mail.gmail.com>, Skip Montanaro <skip.montanaro@gmail.com> wrote:
Hmmm... This morning this is working. I'm mystified. Actually, I should rephrase that. This morning this is working from my Linux machine at work. Yesterday I was twiddling bits from my Mac laptop more-or-less at home. I say, "more-or-less", because we are in a sublet for a bit and I was using the apartment building's "business center" to get on
On Mon, May 4, 2015 at 8:05 AM, Skip Montanaro <skip.montanaro@gmail.com> wrote: the net. I will have to try it from somewhere else with my laptop and see if it behaves differently.
Based on the messages, my guess is that you are not using the most recent version of pip and/or you may be trying to use it with an older version of OpenSSL. Try upgrading to the latest pip; you may find that the download works or that you'll get a more meaningful message. -- Ned Deily, nad@acm.org
On Tue, May 5, 2015 at 3:01 PM, Ned Deily <nad@acm.org> wrote:
Based on the messages, my guess is that you are not using the most recent version of pip and/or you may be trying to use it with an older version of OpenSSL. Try upgrading to the latest pip; you may find that the download works or that you'll get a more meaningful message.
Well, that's not working either: % pip-2.7 install --upgrade pip Cannot fetch index base URL http://pypi.python.org/simple/ Could not find any downloads that satisfy the requirement pip in /Users/skip/local/lib/python2.7/site-packages Downloading/unpacking pip No distributions at all found for pip in /Users/skip/local/lib/python2.7/site-packages Storing complete log in /Users/skip/.pip/pip.log And then I had the bright idea to see if ensurepip was available: % python Python 2.7.9+ (2.7:94ec4d8cf104, Jan 24 2015, 14:56:50) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin Type "help", "copyright", "credits" or "license" for more information.
% python -m ensurepip Ignoring ensurepip failure: pip 6.0.6 requires SSL/TLS
which would explain what's wrong. I'll have to see why SSL/TLS is unavailable. Skip
On Tue, May 5, 2015 at 5:57 PM, Skip Montanaro <skip.montanaro@gmail.com> wrote:
On Tue, May 5, 2015 at 3:01 PM, Ned Deily <nad@acm.org> wrote:
Based on the messages, my guess is that you are not using the most recent version of pip and/or you may be trying to use it with an older version of OpenSSL. Try upgrading to the latest pip; you may find that the download works or that you'll get a more meaningful message.
Well, that's not working either:
% pip-2.7 install --upgrade pip Cannot fetch index base URL http://pypi.python.org/simple/ Could not find any downloads that satisfy the requirement pip in /Users/skip/local/lib/python2.7/site-packages Downloading/unpacking pip No distributions at all found for pip in /Users/skip/local/lib/python2.7/site-packages Storing complete log in /Users/skip/.pip/pip.log
And then I had the bright idea to see if ensurepip was available:
% python Python 2.7.9+ (2.7:94ec4d8cf104, Jan 24 2015, 14:56:50) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin Type "help", "copyright", "credits" or "license" for more information.
% python -m ensurepip Ignoring ensurepip failure: pip 6.0.6 requires SSL/TLS
which would explain what's wrong. I'll have to see why SSL/TLS is unavailable.
It still seems look your first approach should have said something about SSL being required, or is there a reason the message can't or shouldn't be shown in that case? --Chris
On May 5, 2015, at 9:02 PM, Chris Jerdonek <chris.jerdonek@gmail.com> wrote:
On Tue, May 5, 2015 at 5:57 PM, Skip Montanaro <skip.montanaro@gmail.com> wrote:
On Tue, May 5, 2015 at 3:01 PM, Ned Deily <nad@acm.org> wrote:
Based on the messages, my guess is that you are not using the most recent version of pip and/or you may be trying to use it with an older version of OpenSSL. Try upgrading to the latest pip; you may find that the download works or that you'll get a more meaningful message.
Well, that's not working either:
% pip-2.7 install --upgrade pip Cannot fetch index base URL http://pypi.python.org/simple/ Could not find any downloads that satisfy the requirement pip in /Users/skip/local/lib/python2.7/site-packages Downloading/unpacking pip No distributions at all found for pip in /Users/skip/local/lib/python2.7/site-packages Storing complete log in /Users/skip/.pip/pip.log
And then I had the bright idea to see if ensurepip was available:
% python Python 2.7.9+ (2.7:94ec4d8cf104, Jan 24 2015, 14:56:50) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin Type "help", "copyright", "credits" or "license" for more information.
% python -m ensurepip Ignoring ensurepip failure: pip 6.0.6 requires SSL/TLS
which would explain what's wrong. I'll have to see why SSL/TLS is unavailable.
It still seems look your first approach should have said something about SSL being required, or is there a reason the message can't or shouldn't be shown in that case?
Open an issue on github.com/pypa/pip please. --- Donald Stufft PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
On Wed, May 6, 2015 at 8:00 AM, Donald Stufft <donald@stufft.io> wrote:
Open an issue on github.com/pypa/pip please.
Done: https://github.com/pypa/pip/issues/2760 Skip
participants (4)
-
Chris Jerdonek -
Donald Stufft -
Ned Deily -
Skip Montanaro