Alpine with proj executable not found. Please set the PROJ_DIR variable
See original GitHub issueDockerfile
FROM python3.7-alpine
RUN apk add proj proj-dev
RUN pip install pyproj
get error
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python /usr/local/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp_8k0qhw3
cwd: /tmp/pip-install-zzif953y/pyproj
Complete output (1 lines):
proj executable not found. Please set the PROJ_DIR variable.For more information see: https://pyproj4.github.io/pyproj/stable/installation.html
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python /usr/local/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp_8k0qhw3 Check the logs for full command output.
apk add proj
installed PROJ sucessful, but I can‘t get PROJ_DIR
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Unable to install proj related Python packages in a Linux ...
Does it mean it is not installable into an alpine Linux? Notice, I have installed these packages with apk prior to installing Python...
Read more >PyProj package installation PROJ_DIR variable - Stack Overflow
I am attempting to install pyproj , although am getting a Proj executable not found. Please set PROJ_DIR variable error.
Read more >Installation - pyproj 3.5.0.dev0 documentation - GitHub Pages
This enables installing pyproj when the PROJ executables are not present but the header files exist. PROJ_DIR#. This is the path to the...
Read more >Solving pyproj install error — ERROR: PROJ_DIR dir not ...
Solving pyproj install error — ERROR: PROJ_DIR dir not found. Please set PROJ_DIR. I don't know why, but after using this new M1...
Read more >Python – PyProj package installation PROJ_DIR variable
packagepipprojpyprojpython. I am attempting to install pyproj , although am getting a Proj executable not found. Please set PROJ_DIR variable error.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@snowman2, found the solution by install proj-util, Thanks
[Solved] This helped: ENV PROJ_DIR=/usr
#################### Dockerfile (Updated the PROJ_DIR variable)################### FROM alpine:latest
ENV LC_ALL=C.UTF-8 ENV LANG=C.UTF-8 ENV PROJ_DIR=/usr
RUN addgroup -S appuser ; adduser -S appuser -G appuser -h /app ;
chown appuser:appuser /app
WORKDIR /app COPY --chown=appuser:appuser / /app
RUN apk add --update --no-cache python3 libpq uwsgi-python3;
apk add --no-cache python3-dev py3-pip alpine-sdk postgresql-dev postgresql;
*apk add proj proj-dev;
apk add proj-util;
/usr/bin/proj;* pip3 install --upgrade pip ;
pip3 install --upgrade setuptools;
pip3 install --no-cache-dir -r requirements.txt
EXPOSE 5432
CMD [“python3”, “/app/subscriber_db.py”, “/app/resolver.py”]
####################### Requirements.txt ################ numpy==1.19.0 pandas==1.0.5 sqlalchemy==1.3.16 paho-mqtt==1.5.0 psycopg2==2.8.5 six==1.14.0 requests==2.24.0 cython pyproj scipy==1.5.0 statistics==1.0.3.5 matplotlib
###################### Error is fixed #####################