Nosetest and Google API: "no module named apiclient.discovery"

I am trying to run nosetest my little Python script that uses the Google Translate API.
Where do I need to install the API or what do I need to do so nosetest stops telling me

ImportError: No module named apiclient.discovery 

The script works fine, I import it the way you would, and installed it using pip, but I can not find information on how to make this work with nosetest.

Any help would be greatly appreciated! :)

+8
python testing google-api importerror nosetests
source share
2 answers

The script works fine, I import it the way you would, and installed it using pip, but I can not find information on how to make this work with nosetest.

GAE, unfortunately, does not work with pip . I ran into a similar problem.

What you need to do is copy the modules from your Python libraries or you can simply download them from their sites and then paste them directly into your GAE code. Often, developers create a folder called lib and add it to PYTHONPATH .

Then your media should run.

+1
source share

Here I think you can download the tar.gz file at https://pypi.python.org/pypi/apiclient/1.0.2 . unzip it and install it on your computer.

+1
source share

All Articles