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.

all commands fail with ImportError: No module named gce

See original GitHub issue
(py2) [ayush@devbox]$ gsutil ls gs://uspto-pair
Traceback (most recent call last):
  File "/opt/py2/bin/gsutil", line 9, in <module>
    load_entry_point('gsutil==4.16', 'console_scripts', 'gsutil')()
  File "/opt/py2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 547, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/opt/py2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2719, in load_entry_point
    return ep.load()
  File "/opt/py2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2379, in load
    return self.resolve()
  File "/opt/py2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2385, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "build/bdist.linux-x86_64/egg/gslib/__main__.py", line 53, in <module>
  File "build/bdist.linux-x86_64/egg/gslib/wildcard_iterator.py", line 37, in <module>
  File "build/bdist.linux-x86_64/egg/gslib/translation_helper.py", line 25, in <module>
  File "/opt/py2/lib/python2.7/site-packages/google_apitools-0.4.12-py2.7.egg/apitools/base/py/__init__.py", line 20, in <module>
    from apitools.base.py.base_api import *
  File "/opt/py2/lib/python2.7/site-packages/google_apitools-0.4.12-py2.7.egg/apitools/base/py/base_api.py", line 33, in <module>
    from apitools.base.py import credentials_lib
  File "/opt/py2/lib/python2.7/site-packages/google_apitools-0.4.12-py2.7.egg/apitools/base/py/credentials_lib.py", line 28, in <module>
    import oauth2client.gce
ImportError: No module named gce

temp fix: oauth2client.gce has moved to oauth2client.contrib.gce

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ayush--scommented, Feb 18, 2016

also needs pip install 'google-apitools==0.4.12' --force-reinstall along with @camilb 's comment to work correctly

1reaction
camilbcommented, Feb 17, 2016

Another temp fix: pip install ‘oauth2client==1.5.2’ --force-reinstall

Read more comments on GitHub >

github_iconTop Results From Across the Web

ImportError: No module named contrib.gce - Issue Tracker
Just uses the bq command line tool to query, copy and create some tables. Error i got was: ... ImportError: No module named...
Read more >
How to prevent "ImportError: No module named oauth2client ...
I have this problem and solved by installing oauth2client with pip3 : pip3 install --upgrade oauth2client.
Read more >
2021 How to Fix "No Module Named..." Error in Python
2021 How to Fix ImportError " No Module Named pkg_name" in Python! First, download the package using a terminal outside of python.
Read more >
Troubleshooting — ElastiCluster 1.3.dev28 documentation
Upgrading setuptools fails with ImportError: No module named extern ¶ ... Then resume the installation procedure of ElastiCluster from where you left off...
Read more >
python script error: ImportError: No module named pysam
This is most likely the case where you are using a pip command associated with a different python installation. Please share the exact...
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