Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with pip install -r requirements.txt #315

Open
martabracho opened this issue Sep 14, 2023 · 4 comments
Open

Error with pip install -r requirements.txt #315

martabracho opened this issue Sep 14, 2023 · 4 comments

Comments

@martabracho
Copy link

martabracho commented Sep 14, 2023

I am trying to install ckanext-spatial on a ckan 2.10, python 3.9 on a devian 11 SO. The first problem I found was when I try to install the packages is that package libgeos-c1 in debian 11 is now libgeos-c1v5, also my so selects python-dev-is-python2 instead python-dev (This I don´t know if I may force choosing python3-dev). Once I've corrected this two issues it aparents to install fine the python packages and the ckanext-spatial plugin.

The problems comes when I try to install the requirenments with pip install -r requirements.txt. Then it gives me the next error: proj executable not found. Please set the PROJ_DIR variable. I've tried to install pyproj in my /lib/ckan/default/lib/python3.9/site-packages and put the envioronment variables to:

export PROJ_DIR=/lib/ckan/default/lib/python3.9/site-packages/pyproj

export PROJ_LIBDIR=/lib/ckan/default/lib/python3.9/site-packages/pyproj.libs

export PROJ_INCDIR=/lib/ckan/default/lib/python3.9/site-packages/pyproj/proj_dir

but still gives me this error: FileNotFoundError: [Errno 2] No such file or directory: '/lib/ckan/default/lib/python3.9/site-packages/pyproj/bin/proj'

@martabracho martabracho changed the title I am trying to install ckanext-spatial on a ckan 2.10, python 3.9 on a devian 11 SO. The first problem I found was when I try to install the packages is that package libgeos-c1 in debian 11 is now libgeos-c1v5, also my so selects python-dev-is-python2 instead python-dev (This I don´t know if I may force choosing python3-dev). Once I've corrected this two issues it aparents to install fine the python packages and the ckanext-spatial plugin. The problems comes when I try to install the requirenments with pip install -r requirements.txt. Then it gives me the next error: Error with pip install -r requirements.txt Sep 14, 2023
@martabracho
Copy link
Author

martabracho commented Sep 14, 2023

More information:
I've realized that PROJ and PYPROJ are different packages. I've installed both with:

sudo apt-get install proj-bin

and

pip install pyproj

and then I had to run

pip install -r requirements.txt

with root user because it gave me an error of permission, and then it sais:

ERROR: Minimum supported PROJ version is 9.0.0, installed version is 7.2.1

@martabracho
Copy link
Author

I've solved my problem. I installed PROJ version 9.0.0 form source and then compile it, because debian 11 does not install version 9.0.0 form the apt.

@markstuart
Copy link

markstuart commented Nov 13, 2023

Yeah, I have the same issue in the context of a Docker build. Using a python:3.10-slim-bullseye base image, if I apt install proj-bin it only gets version 7.x

I'm wondering why we even need the binary now, when we didn't appear to in earlier versions of pyproj? I'd prefer not to have to add commands to download and compile proj from source to my Dockerfile unless I really have to.

Maybe there's no prebuilt wheel available?

@FedericOldani
Copy link

Hey, I'm just stuck on this problem. Can you write the code to build PROJ >=9.0.0 from Dockerfile?
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants