Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'httplib2 #767

Closed
kylefoley76 opened this issue Oct 22, 2019 · 3 comments
Closed

ModuleNotFoundError: No module named 'httplib2 #767

kylefoley76 opened this issue Oct 22, 2019 · 3 comments
Assignees
Labels
type: question Request for information or clarification. Not an issue.

Comments

@kylefoley76
Copy link

This is day 5 of my attempt to use google cloud services and everywhere I encounter bug-ridden software. I then have to ask someone to help me remove the bugs and then it turns out that their solutions are not written down in the official documentation. I'm almost at my wits end and am about to go over to digital ocean.

In any case I could not pip install googleapiclient. Over here
https://stackoverflow.com/questions/51571392/no-module-named-googleapiclient-discovery

the asker was never given a satisfactory solution. I downloaded the clone directly but I have never had to install a site-package directly and this after 4 years of python programming and probably 200 installations. I didn't know what to do so I just tried moving the folder googleapiclient into the site-packages folder and that at least removed the old error but I seriously doubt the software will work when I do not know what to do with the other folders. In any case, right now I'm getting an error:

Traceback (most recent call last): File "/Users/kylefoley/.pyenv/versions/3.7.3/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3267, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-4-f067a93f3b03>", line 1, in <module> from googleapiclient.discovery import build File "/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import module = self._system_import(name, *args, **kwargs) File "/Users/kylefoley/.pyenv/versions/3.7.3/lib/python3.7/site-packages/googleapiclient/discovery.py", line 52, in <module> import httplib2 File "/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import module = self._system_import(name, *args, **kwargs) ModuleNotFoundError: No module named 'httplib2'

@kylefoley76
Copy link
Author

Ok I pip install httplib2 and that did the trick but I still think it's important that my issue be read so that google understand how terrible their products are.

@busunkim96
Copy link
Contributor

@kylefoley76 Sorry to hear you were having trouble using the library. Please remember to be respectful in this space, as participating in project discussions mean upholding our code of conduct.

The easiest way to install the library is in a fresh virtualenv.

virtualenv env
source env/bin/activate
python3 -m pip install googleapiclient

But since you installed from source, you would have to do something like this to install dependencies:

git clone https://github.com/googleapis/google-api-python-client.git
cd google-api-python-client
python3 -m pip install .

This is a local project install. It's preferable not to do this as the version in master may not yet be stable.

I've opened #768 to update the library installation guide to recommend a virtual environment.

@busunkim96 busunkim96 self-assigned this Oct 22, 2019
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Oct 23, 2019
@busunkim96 busunkim96 added type: question Request for information or clarification. Not an issue. and removed triage me I really want to be triaged. labels Oct 23, 2019
@busunkim96
Copy link
Contributor

The README has been updated with the directions above. If that doesn't work for you please do let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

3 participants