You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Installing google-cloud-bigquery via pip to a specific directory in an amazonlinux docker container does not work as expected.
$ pip3.6 install google-cloud-bigquery -t /tmp/py
$ python3.6
>>> import sys
>>> sys.path.append('/tmp/py')
>>> from google.cloud import bigquery
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/tmp/py/google/cloud/bigquery/__init__.py", line 34, in <module>
from google.cloud.bigquery._helpers import DEFAULT_RETRY
File "/tmp/py/google/cloud/bigquery/_helpers.py", line 21, in <module>
from google.cloud._helpers import UTC
File "/tmp/py/google/cloud/_helpers.py", line 33, in <module>
from google.protobuf import duration_pb2
ModuleNotFoundError: No module named 'google.protobuf'
Possibly helpful notes
Doing a 'normal' pip3.6 install google-cloud-bigquery on this container works as expected.
This method does work when running in a frolvlad/alpine-python3 container.
I've tried this for google-cloud-bigquery versions 0.28.0, 0.31.0, and 0.32.0, and they all fail.
What i'm trying to do
I need to install python packages to a specific directory so that I can create a deploy package for AWS lambda.
I do this by running the following within an amazonlinux-based docker container (to mirror any system-level .so file oddities that crop up with some libraries).
Found the following related issues that appear to relate to the fact that pip is installing some stuff in /usr/lib64/python3.6/site-packages/, and the rest in /usr/lib/python3.6/site-packages.
My workaround for this issue, in case anyone is interested, is to instead simply install to my system and copy those directory contents to where I need them:
chemelnucfin
added
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
api: bigquery
Issues related to the BigQuery API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
labels
Apr 6, 2018
tseaver
added
packaging
and removed
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
labels
Apr 10, 2018
Problem
Installing
google-cloud-bigquery
viapip
to a specific directory in anamazonlinux
docker container does not work as expected.Possibly helpful notes
pip3.6 install google-cloud-bigquery
on this container works as expected.frolvlad/alpine-python3
container.google-cloud-bigquery
versions0.28.0
,0.31.0
, and0.32.0
, and they all fail.What i'm trying to do
I need to install python packages to a specific directory so that I can create a deploy package for AWS lambda.
I do this by running the following within an
amazonlinux
-based docker container (to mirror any system-level.so
file oddities that crop up with some libraries).In my python code in lambda, I then do the following to ensure all modules installed to this directory are available to the rest of my code:
This works fine for all other packages I've used, but breaks when attempting to install
google-cloud-bigquery
.steps to reproduce
Dockerfile
.Dockerfile
Stack Trace
This example shows how I can install
requests
just fine, but notgoogle-cloud-bigquery
.The text was updated successfully, but these errors were encountered: