App Engine: ImportError: No module named _gdal
How to enable python 2.7 library like GDAL in Google App Engine standard? Currently there are linux python-modules in lib-folder in app engine, but when trying to run the code through endpoints, app engine gives internal server error: ImportError: No module named _gdal. I'm using pygdal version 2.2.3.3. Should the libgdal (demanded for pygdal)be installed also on app engine, and if so, how to do it? I installed GDAL locally into lib folder (using ubuntu bash on windows10) following these instructions using this syntax: sudo pip install --target lib --requirement requirements.txt --ignore-installed
as it says here. Please help!
python-2.7

add a comment |
How to enable python 2.7 library like GDAL in Google App Engine standard? Currently there are linux python-modules in lib-folder in app engine, but when trying to run the code through endpoints, app engine gives internal server error: ImportError: No module named _gdal. I'm using pygdal version 2.2.3.3. Should the libgdal (demanded for pygdal)be installed also on app engine, and if so, how to do it? I installed GDAL locally into lib folder (using ubuntu bash on windows10) following these instructions using this syntax: sudo pip install --target lib --requirement requirements.txt --ignore-installed
as it says here. Please help!
python-2.7

Welcome to SO! Please take the time to go through stackoverflow.com/help/asking.
– Dan Cornilescu
Nov 19 '18 at 14:10
Standard environment?
– Dan Cornilescu
Nov 19 '18 at 14:10
Standard environment yes.
– samuq
Nov 19 '18 at 14:18
Thanks for welcoming!
– samuq
Nov 19 '18 at 14:34
add a comment |
How to enable python 2.7 library like GDAL in Google App Engine standard? Currently there are linux python-modules in lib-folder in app engine, but when trying to run the code through endpoints, app engine gives internal server error: ImportError: No module named _gdal. I'm using pygdal version 2.2.3.3. Should the libgdal (demanded for pygdal)be installed also on app engine, and if so, how to do it? I installed GDAL locally into lib folder (using ubuntu bash on windows10) following these instructions using this syntax: sudo pip install --target lib --requirement requirements.txt --ignore-installed
as it says here. Please help!
python-2.7

How to enable python 2.7 library like GDAL in Google App Engine standard? Currently there are linux python-modules in lib-folder in app engine, but when trying to run the code through endpoints, app engine gives internal server error: ImportError: No module named _gdal. I'm using pygdal version 2.2.3.3. Should the libgdal (demanded for pygdal)be installed also on app engine, and if so, how to do it? I installed GDAL locally into lib folder (using ubuntu bash on windows10) following these instructions using this syntax: sudo pip install --target lib --requirement requirements.txt --ignore-installed
as it says here. Please help!
python-2.7

python-2.7

edited Nov 19 '18 at 14:30
asked Nov 19 '18 at 13:25
samuq
142110
142110
Welcome to SO! Please take the time to go through stackoverflow.com/help/asking.
– Dan Cornilescu
Nov 19 '18 at 14:10
Standard environment?
– Dan Cornilescu
Nov 19 '18 at 14:10
Standard environment yes.
– samuq
Nov 19 '18 at 14:18
Thanks for welcoming!
– samuq
Nov 19 '18 at 14:34
add a comment |
Welcome to SO! Please take the time to go through stackoverflow.com/help/asking.
– Dan Cornilescu
Nov 19 '18 at 14:10
Standard environment?
– Dan Cornilescu
Nov 19 '18 at 14:10
Standard environment yes.
– samuq
Nov 19 '18 at 14:18
Thanks for welcoming!
– samuq
Nov 19 '18 at 14:34
Welcome to SO! Please take the time to go through stackoverflow.com/help/asking.
– Dan Cornilescu
Nov 19 '18 at 14:10
Welcome to SO! Please take the time to go through stackoverflow.com/help/asking.
– Dan Cornilescu
Nov 19 '18 at 14:10
Standard environment?
– Dan Cornilescu
Nov 19 '18 at 14:10
Standard environment?
– Dan Cornilescu
Nov 19 '18 at 14:10
Standard environment yes.
– samuq
Nov 19 '18 at 14:18
Standard environment yes.
– samuq
Nov 19 '18 at 14:18
Thanks for welcoming!
– samuq
Nov 19 '18 at 14:34
Thanks for welcoming!
– samuq
Nov 19 '18 at 14:34
add a comment |
3 Answers
3
active
oldest
votes
From What compiler can I use to build GDAL/OGR?
GDAL/OGR is written in ANSI C and C++. It can be compiled with all modern C/C++ compilers.
Which means it's incompatible with the (1st generation/python 2.7) standard environment Pure Python sandbox requirement:
All code for the Python runtime environment must be pure Python, and
not include any C extensions or other code that must be compiled.
You may want to look at the flexible environment instead. Probably with a custom runtime, see Up-to-date pip with AppEngine Python flex env?
Thanks, I'll give that a try.
– samuq
Nov 19 '18 at 15:01
I'm getting error: ImportError: No module named osgeo. I managed to install gdal using following though: stackoverflow.com/questions/46348004/… How to use that version of gdal in python? I'm currently using: from osgeo import osr
– samuq
Nov 20 '18 at 13:50
Practically the same recipe should be applied toosgeo
(or any other similar dependencies). You'd have to "merge" the docker building to only have a single dockerfile in the end
– Dan Cornilescu
Nov 20 '18 at 15:19
add a comment |
Google App Engine's standard environment for Python27 only supports a specific set of third-party libraries that use C-extensions, listed here. pygdal
is not in the list.
You may want to look into the Python3 standard runtime, though it is in beta. It allows you to install arbitrary third-party libraries.
Thanks for your answer! It seems that pygdal is only for python 2 according to this: pypi.org/project/pygdal , so what would be equivalent for python 3.7? I've tried everything but installing GDAL in App Engine seems impossible.
– samuq
Nov 19 '18 at 14:44
This might work, but only if GDAL is offered as a pip-installable python library, see cloud.google.com/appengine/docs/standard/python3/…
– Dan Cornilescu
Nov 19 '18 at 14:47
@samuq, I didn't realize it was Python2-only. The GAE flexible environment also lets you install arbitrary packages also, but basically by constructing a Docker container. This answer seems useful to building such a container.
– Andrew F
Nov 19 '18 at 15:21
@AndrewFiorillo, Thanks, I'll try that solution (flexible environment + Docker container).
– samuq
Nov 19 '18 at 18:06
add a comment |
Modifying this links' answer I managed to get GDAL working in App Engine Flexible.
My dockerfile:
FROM gcr.io/google-appengine/python
RUN apt-get update && apt-get -y install libproj-dev libgdal-dev
RUN export CPLUS_INCLUDE_PATH=/usr/include/gdal
RUN export C_INCLUDE_PATH=/usr/include/gdal
RUN gdal-config --version
# Create a virtualenv for dependencies. This isolates these packages from
# system-level packages.
RUN virtualenv /env -p python2.7
# Setting these environment variables are the same as running
# source /env/bin/activate.
ENV VIRTUAL_ENV /env
ENV PATH /env/bin:$PATH
# Copy the application's requirements.txt and run pip to install all
# dependencies into the virtualenv.
ADD requirements.txt requirements.txt
RUN pip install -r requirements.txt
# Add the application source code.
ADD . /app
CMD gunicorn -t 120 -b :$PORT main:app
My app.yaml-file:
runtime: custom
env: flex
entrypoint: gunicorn -t 120 -b :$PORT main:app
endpoints_api_service:
name: xxxxx.com
rollout_strategy: managed
beta_settings:
cloud_sql_instances: project:europe-north1:dbinstance
runtime_config:
python_version: 2
requirements.text-file:
pygdal==1.11.3.3
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53375627%2fapp-engine-importerror-no-module-named-gdal%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
From What compiler can I use to build GDAL/OGR?
GDAL/OGR is written in ANSI C and C++. It can be compiled with all modern C/C++ compilers.
Which means it's incompatible with the (1st generation/python 2.7) standard environment Pure Python sandbox requirement:
All code for the Python runtime environment must be pure Python, and
not include any C extensions or other code that must be compiled.
You may want to look at the flexible environment instead. Probably with a custom runtime, see Up-to-date pip with AppEngine Python flex env?
Thanks, I'll give that a try.
– samuq
Nov 19 '18 at 15:01
I'm getting error: ImportError: No module named osgeo. I managed to install gdal using following though: stackoverflow.com/questions/46348004/… How to use that version of gdal in python? I'm currently using: from osgeo import osr
– samuq
Nov 20 '18 at 13:50
Practically the same recipe should be applied toosgeo
(or any other similar dependencies). You'd have to "merge" the docker building to only have a single dockerfile in the end
– Dan Cornilescu
Nov 20 '18 at 15:19
add a comment |
From What compiler can I use to build GDAL/OGR?
GDAL/OGR is written in ANSI C and C++. It can be compiled with all modern C/C++ compilers.
Which means it's incompatible with the (1st generation/python 2.7) standard environment Pure Python sandbox requirement:
All code for the Python runtime environment must be pure Python, and
not include any C extensions or other code that must be compiled.
You may want to look at the flexible environment instead. Probably with a custom runtime, see Up-to-date pip with AppEngine Python flex env?
Thanks, I'll give that a try.
– samuq
Nov 19 '18 at 15:01
I'm getting error: ImportError: No module named osgeo. I managed to install gdal using following though: stackoverflow.com/questions/46348004/… How to use that version of gdal in python? I'm currently using: from osgeo import osr
– samuq
Nov 20 '18 at 13:50
Practically the same recipe should be applied toosgeo
(or any other similar dependencies). You'd have to "merge" the docker building to only have a single dockerfile in the end
– Dan Cornilescu
Nov 20 '18 at 15:19
add a comment |
From What compiler can I use to build GDAL/OGR?
GDAL/OGR is written in ANSI C and C++. It can be compiled with all modern C/C++ compilers.
Which means it's incompatible with the (1st generation/python 2.7) standard environment Pure Python sandbox requirement:
All code for the Python runtime environment must be pure Python, and
not include any C extensions or other code that must be compiled.
You may want to look at the flexible environment instead. Probably with a custom runtime, see Up-to-date pip with AppEngine Python flex env?
From What compiler can I use to build GDAL/OGR?
GDAL/OGR is written in ANSI C and C++. It can be compiled with all modern C/C++ compilers.
Which means it's incompatible with the (1st generation/python 2.7) standard environment Pure Python sandbox requirement:
All code for the Python runtime environment must be pure Python, and
not include any C extensions or other code that must be compiled.
You may want to look at the flexible environment instead. Probably with a custom runtime, see Up-to-date pip with AppEngine Python flex env?
answered Nov 19 '18 at 14:39


Dan Cornilescu
27.7k113161
27.7k113161
Thanks, I'll give that a try.
– samuq
Nov 19 '18 at 15:01
I'm getting error: ImportError: No module named osgeo. I managed to install gdal using following though: stackoverflow.com/questions/46348004/… How to use that version of gdal in python? I'm currently using: from osgeo import osr
– samuq
Nov 20 '18 at 13:50
Practically the same recipe should be applied toosgeo
(or any other similar dependencies). You'd have to "merge" the docker building to only have a single dockerfile in the end
– Dan Cornilescu
Nov 20 '18 at 15:19
add a comment |
Thanks, I'll give that a try.
– samuq
Nov 19 '18 at 15:01
I'm getting error: ImportError: No module named osgeo. I managed to install gdal using following though: stackoverflow.com/questions/46348004/… How to use that version of gdal in python? I'm currently using: from osgeo import osr
– samuq
Nov 20 '18 at 13:50
Practically the same recipe should be applied toosgeo
(or any other similar dependencies). You'd have to "merge" the docker building to only have a single dockerfile in the end
– Dan Cornilescu
Nov 20 '18 at 15:19
Thanks, I'll give that a try.
– samuq
Nov 19 '18 at 15:01
Thanks, I'll give that a try.
– samuq
Nov 19 '18 at 15:01
I'm getting error: ImportError: No module named osgeo. I managed to install gdal using following though: stackoverflow.com/questions/46348004/… How to use that version of gdal in python? I'm currently using: from osgeo import osr
– samuq
Nov 20 '18 at 13:50
I'm getting error: ImportError: No module named osgeo. I managed to install gdal using following though: stackoverflow.com/questions/46348004/… How to use that version of gdal in python? I'm currently using: from osgeo import osr
– samuq
Nov 20 '18 at 13:50
Practically the same recipe should be applied to
osgeo
(or any other similar dependencies). You'd have to "merge" the docker building to only have a single dockerfile in the end– Dan Cornilescu
Nov 20 '18 at 15:19
Practically the same recipe should be applied to
osgeo
(or any other similar dependencies). You'd have to "merge" the docker building to only have a single dockerfile in the end– Dan Cornilescu
Nov 20 '18 at 15:19
add a comment |
Google App Engine's standard environment for Python27 only supports a specific set of third-party libraries that use C-extensions, listed here. pygdal
is not in the list.
You may want to look into the Python3 standard runtime, though it is in beta. It allows you to install arbitrary third-party libraries.
Thanks for your answer! It seems that pygdal is only for python 2 according to this: pypi.org/project/pygdal , so what would be equivalent for python 3.7? I've tried everything but installing GDAL in App Engine seems impossible.
– samuq
Nov 19 '18 at 14:44
This might work, but only if GDAL is offered as a pip-installable python library, see cloud.google.com/appengine/docs/standard/python3/…
– Dan Cornilescu
Nov 19 '18 at 14:47
@samuq, I didn't realize it was Python2-only. The GAE flexible environment also lets you install arbitrary packages also, but basically by constructing a Docker container. This answer seems useful to building such a container.
– Andrew F
Nov 19 '18 at 15:21
@AndrewFiorillo, Thanks, I'll try that solution (flexible environment + Docker container).
– samuq
Nov 19 '18 at 18:06
add a comment |
Google App Engine's standard environment for Python27 only supports a specific set of third-party libraries that use C-extensions, listed here. pygdal
is not in the list.
You may want to look into the Python3 standard runtime, though it is in beta. It allows you to install arbitrary third-party libraries.
Thanks for your answer! It seems that pygdal is only for python 2 according to this: pypi.org/project/pygdal , so what would be equivalent for python 3.7? I've tried everything but installing GDAL in App Engine seems impossible.
– samuq
Nov 19 '18 at 14:44
This might work, but only if GDAL is offered as a pip-installable python library, see cloud.google.com/appengine/docs/standard/python3/…
– Dan Cornilescu
Nov 19 '18 at 14:47
@samuq, I didn't realize it was Python2-only. The GAE flexible environment also lets you install arbitrary packages also, but basically by constructing a Docker container. This answer seems useful to building such a container.
– Andrew F
Nov 19 '18 at 15:21
@AndrewFiorillo, Thanks, I'll try that solution (flexible environment + Docker container).
– samuq
Nov 19 '18 at 18:06
add a comment |
Google App Engine's standard environment for Python27 only supports a specific set of third-party libraries that use C-extensions, listed here. pygdal
is not in the list.
You may want to look into the Python3 standard runtime, though it is in beta. It allows you to install arbitrary third-party libraries.
Google App Engine's standard environment for Python27 only supports a specific set of third-party libraries that use C-extensions, listed here. pygdal
is not in the list.
You may want to look into the Python3 standard runtime, though it is in beta. It allows you to install arbitrary third-party libraries.
answered Nov 19 '18 at 14:36


Andrew F
58839
58839
Thanks for your answer! It seems that pygdal is only for python 2 according to this: pypi.org/project/pygdal , so what would be equivalent for python 3.7? I've tried everything but installing GDAL in App Engine seems impossible.
– samuq
Nov 19 '18 at 14:44
This might work, but only if GDAL is offered as a pip-installable python library, see cloud.google.com/appengine/docs/standard/python3/…
– Dan Cornilescu
Nov 19 '18 at 14:47
@samuq, I didn't realize it was Python2-only. The GAE flexible environment also lets you install arbitrary packages also, but basically by constructing a Docker container. This answer seems useful to building such a container.
– Andrew F
Nov 19 '18 at 15:21
@AndrewFiorillo, Thanks, I'll try that solution (flexible environment + Docker container).
– samuq
Nov 19 '18 at 18:06
add a comment |
Thanks for your answer! It seems that pygdal is only for python 2 according to this: pypi.org/project/pygdal , so what would be equivalent for python 3.7? I've tried everything but installing GDAL in App Engine seems impossible.
– samuq
Nov 19 '18 at 14:44
This might work, but only if GDAL is offered as a pip-installable python library, see cloud.google.com/appengine/docs/standard/python3/…
– Dan Cornilescu
Nov 19 '18 at 14:47
@samuq, I didn't realize it was Python2-only. The GAE flexible environment also lets you install arbitrary packages also, but basically by constructing a Docker container. This answer seems useful to building such a container.
– Andrew F
Nov 19 '18 at 15:21
@AndrewFiorillo, Thanks, I'll try that solution (flexible environment + Docker container).
– samuq
Nov 19 '18 at 18:06
Thanks for your answer! It seems that pygdal is only for python 2 according to this: pypi.org/project/pygdal , so what would be equivalent for python 3.7? I've tried everything but installing GDAL in App Engine seems impossible.
– samuq
Nov 19 '18 at 14:44
Thanks for your answer! It seems that pygdal is only for python 2 according to this: pypi.org/project/pygdal , so what would be equivalent for python 3.7? I've tried everything but installing GDAL in App Engine seems impossible.
– samuq
Nov 19 '18 at 14:44
This might work, but only if GDAL is offered as a pip-installable python library, see cloud.google.com/appengine/docs/standard/python3/…
– Dan Cornilescu
Nov 19 '18 at 14:47
This might work, but only if GDAL is offered as a pip-installable python library, see cloud.google.com/appengine/docs/standard/python3/…
– Dan Cornilescu
Nov 19 '18 at 14:47
@samuq, I didn't realize it was Python2-only. The GAE flexible environment also lets you install arbitrary packages also, but basically by constructing a Docker container. This answer seems useful to building such a container.
– Andrew F
Nov 19 '18 at 15:21
@samuq, I didn't realize it was Python2-only. The GAE flexible environment also lets you install arbitrary packages also, but basically by constructing a Docker container. This answer seems useful to building such a container.
– Andrew F
Nov 19 '18 at 15:21
@AndrewFiorillo, Thanks, I'll try that solution (flexible environment + Docker container).
– samuq
Nov 19 '18 at 18:06
@AndrewFiorillo, Thanks, I'll try that solution (flexible environment + Docker container).
– samuq
Nov 19 '18 at 18:06
add a comment |
Modifying this links' answer I managed to get GDAL working in App Engine Flexible.
My dockerfile:
FROM gcr.io/google-appengine/python
RUN apt-get update && apt-get -y install libproj-dev libgdal-dev
RUN export CPLUS_INCLUDE_PATH=/usr/include/gdal
RUN export C_INCLUDE_PATH=/usr/include/gdal
RUN gdal-config --version
# Create a virtualenv for dependencies. This isolates these packages from
# system-level packages.
RUN virtualenv /env -p python2.7
# Setting these environment variables are the same as running
# source /env/bin/activate.
ENV VIRTUAL_ENV /env
ENV PATH /env/bin:$PATH
# Copy the application's requirements.txt and run pip to install all
# dependencies into the virtualenv.
ADD requirements.txt requirements.txt
RUN pip install -r requirements.txt
# Add the application source code.
ADD . /app
CMD gunicorn -t 120 -b :$PORT main:app
My app.yaml-file:
runtime: custom
env: flex
entrypoint: gunicorn -t 120 -b :$PORT main:app
endpoints_api_service:
name: xxxxx.com
rollout_strategy: managed
beta_settings:
cloud_sql_instances: project:europe-north1:dbinstance
runtime_config:
python_version: 2
requirements.text-file:
pygdal==1.11.3.3
add a comment |
Modifying this links' answer I managed to get GDAL working in App Engine Flexible.
My dockerfile:
FROM gcr.io/google-appengine/python
RUN apt-get update && apt-get -y install libproj-dev libgdal-dev
RUN export CPLUS_INCLUDE_PATH=/usr/include/gdal
RUN export C_INCLUDE_PATH=/usr/include/gdal
RUN gdal-config --version
# Create a virtualenv for dependencies. This isolates these packages from
# system-level packages.
RUN virtualenv /env -p python2.7
# Setting these environment variables are the same as running
# source /env/bin/activate.
ENV VIRTUAL_ENV /env
ENV PATH /env/bin:$PATH
# Copy the application's requirements.txt and run pip to install all
# dependencies into the virtualenv.
ADD requirements.txt requirements.txt
RUN pip install -r requirements.txt
# Add the application source code.
ADD . /app
CMD gunicorn -t 120 -b :$PORT main:app
My app.yaml-file:
runtime: custom
env: flex
entrypoint: gunicorn -t 120 -b :$PORT main:app
endpoints_api_service:
name: xxxxx.com
rollout_strategy: managed
beta_settings:
cloud_sql_instances: project:europe-north1:dbinstance
runtime_config:
python_version: 2
requirements.text-file:
pygdal==1.11.3.3
add a comment |
Modifying this links' answer I managed to get GDAL working in App Engine Flexible.
My dockerfile:
FROM gcr.io/google-appengine/python
RUN apt-get update && apt-get -y install libproj-dev libgdal-dev
RUN export CPLUS_INCLUDE_PATH=/usr/include/gdal
RUN export C_INCLUDE_PATH=/usr/include/gdal
RUN gdal-config --version
# Create a virtualenv for dependencies. This isolates these packages from
# system-level packages.
RUN virtualenv /env -p python2.7
# Setting these environment variables are the same as running
# source /env/bin/activate.
ENV VIRTUAL_ENV /env
ENV PATH /env/bin:$PATH
# Copy the application's requirements.txt and run pip to install all
# dependencies into the virtualenv.
ADD requirements.txt requirements.txt
RUN pip install -r requirements.txt
# Add the application source code.
ADD . /app
CMD gunicorn -t 120 -b :$PORT main:app
My app.yaml-file:
runtime: custom
env: flex
entrypoint: gunicorn -t 120 -b :$PORT main:app
endpoints_api_service:
name: xxxxx.com
rollout_strategy: managed
beta_settings:
cloud_sql_instances: project:europe-north1:dbinstance
runtime_config:
python_version: 2
requirements.text-file:
pygdal==1.11.3.3
Modifying this links' answer I managed to get GDAL working in App Engine Flexible.
My dockerfile:
FROM gcr.io/google-appengine/python
RUN apt-get update && apt-get -y install libproj-dev libgdal-dev
RUN export CPLUS_INCLUDE_PATH=/usr/include/gdal
RUN export C_INCLUDE_PATH=/usr/include/gdal
RUN gdal-config --version
# Create a virtualenv for dependencies. This isolates these packages from
# system-level packages.
RUN virtualenv /env -p python2.7
# Setting these environment variables are the same as running
# source /env/bin/activate.
ENV VIRTUAL_ENV /env
ENV PATH /env/bin:$PATH
# Copy the application's requirements.txt and run pip to install all
# dependencies into the virtualenv.
ADD requirements.txt requirements.txt
RUN pip install -r requirements.txt
# Add the application source code.
ADD . /app
CMD gunicorn -t 120 -b :$PORT main:app
My app.yaml-file:
runtime: custom
env: flex
entrypoint: gunicorn -t 120 -b :$PORT main:app
endpoints_api_service:
name: xxxxx.com
rollout_strategy: managed
beta_settings:
cloud_sql_instances: project:europe-north1:dbinstance
runtime_config:
python_version: 2
requirements.text-file:
pygdal==1.11.3.3
edited Nov 21 '18 at 14:43
answered Nov 21 '18 at 14:32
samuq
142110
142110
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53375627%2fapp-engine-importerror-no-module-named-gdal%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Welcome to SO! Please take the time to go through stackoverflow.com/help/asking.
– Dan Cornilescu
Nov 19 '18 at 14:10
Standard environment?
– Dan Cornilescu
Nov 19 '18 at 14:10
Standard environment yes.
– samuq
Nov 19 '18 at 14:18
Thanks for welcoming!
– samuq
Nov 19 '18 at 14:34