LukasKawerau
LukasKawerau

Reputation: 1071

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

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

ImportError: No module named apiclient.discovery

The script runs fine, I import it as you would and installed it with pip, but I can't find any info on how to make this work with nosetest.

Any help would be greatly appreciated! :)

Upvotes: 8

Views: 2550

Answers (2)

lonelyjohner
lonelyjohner

Reputation: 85

Here I think you can download the tar.gz file at https://pypi.python.org/pypi/apiclient/1.0.2. unpack it and have it installed on your PC.

Upvotes: 1

Nafiul Islam
Nafiul Islam

Reputation: 82470

The script runs fine, I import it as you would and installed it with pip, but I can't find any info on how to make this work with nosetest.

GAE does not work with pip very well unfortunately. I've encountered a similar problem like this.

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

Then your nosetests should run.

Upvotes: 1

Related Questions