tensorflow / tensor2tensor

Library of deep learning models and datasets designed to make deep learning more accessible and accelerate ML research.
Apache License 2.0
15.5k stars 3.49k forks source link

ModuleNotFoundError: No module named 'oauth2client' #854

Open activatedgeek opened 6 years ago

activatedgeek commented 6 years ago

Description

The requirements are missing oauth2client as a dependency. pip install tensor2tensor does not install it, nor it has been specified in setup.py.

Environment information

OS: macOS 10.13

$ pip freeze | grep tensor
tensor2tensor==1.6.3
tensorboard==1.8.0
tensorflow==1.8.0

$ python -V
Python 3.6.5

For bugs: reproduction and error logs

# Steps to reproduce:
1. `pip install tensor2tensor`
2. `t2t-trainer ...` (on any problem)
# Error logs:
Traceback (most recent call last):
  File "/Workspace/venv3/lib/python3.6/site-packages/tensor2tensor/bin/t2t_trainer.py", line 28, in <module>
    from tensor2tensor.utils import cloud_mlengine
  File "/Workspace/venv3/lib/python3.6/site-packages/tensor2tensor/utils/cloud_mlengine.py", line 24, in <module>
    from oauth2client.client import GoogleCredentials
ModuleNotFoundError: No module named 'oauth2client'

Potential Fix

$ pip install oauth2client

or add it to setup.py#L34

martinpopel commented 6 years ago

Few more details: setup.py requires google-api-python-client, which depended on oauth2client in past. However, oauth2client is now deprecated (substituted by google-auth) and google-api-python-client does not depend on it anymore (it requires google-auth, uritemplate, google-auth-httplib2, httplib2, six). Thus, I think the code in tensor2tensor/utils/cloud_mlengine.py should be updated to use only the non-deprecated API from google-api-python-client.

texasmichelle commented 6 years ago

I also ran into this error and would like to see a fix since it impacts uses of tensor2tensor that have no references to CMLE.

hpulfc commented 6 years ago

Perfect !

rsepassi commented 6 years ago

Current fix is to add oauth2client to the deps (will have a new release out shortly) but we should move away from it because it's deprecated.