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
Im trying to build/install GDAL using pip and im getting this error:
error: OPTGetProjectionMethods was not declared in this scope; did you mean py_OPTGetProjectionMethods
Steps to reproduce the problem.
Here is my docker File:
# Docker container that installs Python 3.6, GDAL and necessary shippable dependencies for CI
FROM python:3.7-stretch
# Set the working directory to /app
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . /app
# Update base container install
RUN apt-get update
RUN apt-get upgrade -y
# Add unstable repo to allow us to access latest GDAL builds
RUN echo deb http://ftp.uk.debian.org/debian unstable main contrib non-free >> /etc/apt/sources.list
RUN apt-get update
## Install PostGIS
#RUN apt-get -t unstable install -y postgresql-11-postgis-2.5
#
## Update privs to allow Postgres to run locally
#RUN sed -i "s/local all postgres peer/local all postgres trust/" /etc/postgresql/11/main/pg_hba.conf
## Existing binutils causes a dependency conflict, correct version will be installed when GDAL gets intalled
RUN apt-get remove -y binutils
#
## Install GDAL dependencies
RUN apt-get -t unstable install -y libgdal-dev g++
#
## Update C env vars so compiler can find gdal
ENV CPLUS_INCLUDE_PATH=/usr/include/gdal
ENV C_INCLUDE_PATH=/usr/include/gdal
#
## Install CURL certs
RUN apt-get install ca-certificates -y
ENV CURL_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt
## This will install latest version of GDAL
RUN pip install numpy
RUN pip install GDAL==2.4.4
## Setup default locale
#RUN echo en_US.UTF-8 UTF-8 > /etc/locale.gen
#RUN locale-gen en_US.UTF-8
# Install any needed packages specified in requirements.txt
RUN pip install --trusted-host pypi.python.org -r requirements.txt
# Define environment variable
ENV CELERY_BROKER_URL redis://redis:6379/0
ENV CELERY_RESULT_BACKEND redis://redis:6379/0
ENV C_FORCE_ROOT true
ENV FLASK_CONFIG development
ENV FLASK_ENV development
ENV FLASK_APP app/__init__.py
EXPOSE 8000
CMD ["gunicorn", "wsgi:app", "-b", "0.0.0.0:8000", "-w", "4", "--log-level", "debug"]
GDAL version and provenance
2.4.4
The text was updated successfully, but these errors were encountered:
Probably a mismatch between your native GDAL and the python bindings forced at 2.4.4. OPTGetProjectionMethods() has been removed starting with GDAL 3.0, so I presume you got that version as the native lib
Expected behavior and actual behavior.
Im trying to build/install GDAL using pip and im getting this error:
error: OPTGetProjectionMethods was not declared in this scope; did you mean py_OPTGetProjectionMethods
Steps to reproduce the problem.
Here is my docker File:
GDAL version and provenance
2.4.4
The text was updated successfully, but these errors were encountered: