It sounds like you are following the "Using third-party libraries" document
below. If you follow these directions, everything will work if you use
dev_appserver.py or run in production. However, when you run things
locally, you will need to add the lib directory to your PYTHONPATH in some
way. I've found the easiest way is to set the PYTHONPATH environment
variable manually. For example:
PYTHONPATH=lib python (myscript.py)
I hope that helps,
Evan
On Thursday, January 19, 2017 at 9:07:21 AM UTC-5, Sumanau Sareen wrote:
>
>
> I am trying to use google BigQuery Client library : pip install --upgrade
> google-cloud-bigquery - t lib/
>
> where lib is the folder where i have all python libraries. This
> successfully install the library lib/google/cloud/bigquery.
>
> But when i try to import it in dev console by using
> from google.cloud import bigquery
>
> it gives an import error:
>
> Traceback (most recent call last):
> File
> "/home/development/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/python/request_handler.py",
> line 226, in handle_interactive_request
> exec(compiled_code, self._command_globals)
> File "<string>", line 1, in <module>
> File
> "/home/development/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/python/sandbox.py",
> line 1001, in load_module
> raise ImportError('No module named %s' % fullname)
> ImportError: No module named google.cloud.bigquery
>
>
>
> I have also tried the approach mentioned on stackoverflow thread:
> http://stackoverflow.com/questions/40418201/google-cloud-bigquery-import-not-working-in-app-engine-project
>
> It suggests to use:
>
> from __future__ import absolute_import
>
> But it still results in import error. Has anyone else faced similar issues
> in local dev app server before. In production appengine environment,
> everything works fine.
>
> Thanks,
> Sumanau
>
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-appengine/715325ab-22ea-4b1e-8bf8-a185d4e8e742%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.