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

Missing package: pyproj #60

Open
snowman2 opened this issue Nov 10, 2019 · 18 comments
Open

Missing package: pyproj #60

snowman2 opened this issue Nov 10, 2019 · 18 comments

Comments

@snowman2
Copy link

snowman2 commented Nov 10, 2019

Package name: pyproj
Issue type: Missing package
Link to PyPI page: https://pypi.org/project/pyproj
Link to piwheels page: https://www.piwheels.org/project/pyproj/
Version: 2+
Python version: 3.5+
More information:

@bennuttall bennuttall changed the title Broken package: pyproj Missing package: pyproj Nov 11, 2019
@bennuttall
Copy link
Member

This is a missing package, not a broken package. Updated issue accordingly.

Looking at the build logs it's a hugely complex setup.py and the build process requires a specific version of cython. Nontrivial, I'm afraid.

@snowman2
Copy link
Author

I would be happy to assist with this, just not familiar with your setup. If you have PROJ installed beforehand, it should be okay. I think this file will be the most helpful: https://github.com/pyproj4/pyproj-wheels/blob/master/config.sh

@snowman2
Copy link
Author

snowman2 commented Nov 18, 2019

I was able to make a wheel with (just copied over commands - likely needs tweaking):

mkdir -p ~/projects/sqlite
wget https://www.sqlite.org/2018/sqlite-autoconf-3240000.tar.gz
mv sqlite-autoconf-3240000.tar.gz projects/sqlite/
cd ~/projects/sqlite/
tar xf sqlite-autoconf-3240000.tar.gz 
cd sqlite-autoconf-3240000/
./configure
make
make install
cd $HOME
mkdir -p ~/projects/proj
git clone [email protected]:pyproj4/pyproj.git
cd pyproj
PROJ_DIR=$HOME/projects/proj bash proj-dl-and-compile 6.2.1
mkdir -p pyproj/proj_dir/share
cp -r $HOME/projects/proj/share/proj/ pyproj/proj_dir/share/
PROJ_DIR=$HOME/projects/proj PROJ_WHEEL=TRUE python setup.py bdist_wheel
pip install auditwheel
sudo apt-get install patchelf
auditwheel repair --plat linux_armv7l dist/pyproj-2.4.1-cp37-cp37m-linux_armv7l.whl

But having issues with numpy when attempting to test:

ImportError while importing test module '/home/pi/projects/pyproj_tests/test_transformer.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../.local/share/virtualenvs/pyproj-fOWtlaZ7/lib/python3.7/site-packages/numpy/core/__init__.py:17: in <module>
    from . import multiarray
../../.local/share/virtualenvs/pyproj-fOWtlaZ7/lib/python3.7/site-packages/numpy/core/multiarray.py:14: in <module>
    from . import overrides
../../.local/share/virtualenvs/pyproj-fOWtlaZ7/lib/python3.7/site-packages/numpy/core/overrides.py:7: in <module>
    from numpy.core._multiarray_umath import (
E   ImportError: libf77blas.so.3: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:
test_transformer.py:3: in <module>
    import numpy as np
../../.local/share/virtualenvs/pyproj-fOWtlaZ7/lib/python3.7/site-packages/numpy/__init__.py:142: in <module>
    from . import core
../../.local/share/virtualenvs/pyproj-fOWtlaZ7/lib/python3.7/site-packages/numpy/core/__init__.py:47: in <module>
    raise ImportError(msg)
E   ImportError: 
E   
E   IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
E   
E   Importing the numpy c-extensions failed.
E   - Try uninstalling and reinstalling numpy.
E   - If you have already done that, then:
E     1. Check that you expected to use Python3.7 from "/home/pi/.local/share/virtualenvs/pyproj-fOWtlaZ7/bin/python3",
E        and that you have no directories in your PATH or PYTHONPATH that can
E        interfere with the Python and numpy version "1.17.4" you're trying to use.
E     2. If (1) looks fine, you can open a new issue at
E        https://github.com/numpy/numpy/issues.  Please include details on:
E        - how you installed Python
E        - how you installed numpy
E        - your operating system
E        - whether or not you have multiple versions of Python installed
E        - if you built from source, your compiler versions and ideally a build log
E   
E   - If you're working with a numpy git repository, try `git clean -xdf`
E     (removes all files not under version control) and rebuild numpy.
E   
E   Note: this error has many possible causes, so please don't comment on
E   an existing issue about this - open a new one instead.
E   
E   Original error was: libf77blas.so.3: cannot open shared object file: No such file or directory

Recommendations?

@bennuttall
Copy link
Member

sudo apt install libatlas3-base should fix it

@snowman2
Copy link
Author

That did the trick. Thanks!

$ pytest
============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.2.4, py-1.8.0, pluggy-0.13.0
rootdir: /home/pi/projects/pyproj_tests
plugins: cov-2.8.1
collected 325 items                                                            

test__main__.py ...                                                      [  0%]
test_awips221.py .                                                       [  1%]
test_crs.py ............................................................ [ 19%]
.......................................................                  [ 36%]
test_crs_cf.py .................                                         [ 41%]
test_crs_json.py ..................................                      [ 52%]
test_datadir.py ..........                                               [ 55%]
test_datum.py .                                                          [ 55%]
test_datum_shift.py ....                                                 [ 56%]
test_doctest_wrapper.py .                                                [ 57%]
test_exception_logging.py ..                                             [ 57%]
test_geod.py .......sssssssssssssssssssss                                [ 66%]
test_list.py ...................                                         [ 72%]
test_pickle.py .                                                         [ 72%]
test_proj.py .........................                                   [ 80%]
test_show_versions.py ....                                               [ 81%]
test_transform.py .                                                      [ 81%]
test_transformer.py .................................................... [ 97%]
.......                                                                  [100%]

================== 304 passed, 21 skipped in 79.07s (0:01:19) ==================

@snowman2
Copy link
Author

Here is a wheel for Linux raspberrypi 4.19.75-v7l+ #1270 SMP Tue Sep 24 18:51:41 BST 2019 armv7l GNU/Linux

pyproj-2.4.1-cp37-cp37m-linux_armv7l.whl.zip

@snowman2
Copy link
Author

Do y'all have a way to support custom builds like this one?

@bennuttall
Copy link
Member

Not really. We import wheels build outside the system in special cases (just tensorflow and opencv). Could perhaps build and import the latest one and if it's popular, keep uploading new releases.

@snowman2
Copy link
Author

Okay, that sounds good. Thanks!

@snowman2
Copy link
Author

snowman2 commented Jul 9, 2021

Another request: pyproj4/pyproj#877

@snowman2
Copy link
Author

snowman2 commented Jul 9, 2021

Previously requested here: pyproj4/pyproj#480

@snowman2
Copy link
Author

snowman2 commented Jul 9, 2021

Also related: pyproj4/pyproj#323

@snowman2
Copy link
Author

snowman2 commented Aug 9, 2021

Another raspberry pi user struggling to install pyproj: pyproj4/pyproj#893

@WiseGamgee
Copy link

Adding another comment as a raspberry pi user having the same issue getting pyproj installed via pip on Raspbian/Raspberry Pi OS.

Aside from attempting to install from source, should using a different OS like Ubuntu Mate theoretically work? Apologies if this may be a little simple, my understanding of back-ends and OS's is quite limited.

@AlexHorlock-DA
Copy link

I'm also not able to install pyproj v3.2.1 on a raspberry pi model 4. My understanding is it has a dependency on 'PROJ' which seems to not be correctly included somehow when using pip (v 23) to install.

@snowman2
Copy link
Author

Related: pyproj4/pyproj#1250

@xbug42
Copy link

xbug42 commented Apr 12, 2023

I also hit the problem on a RaspberryPi 3 with Raspbian 11 (bullseye).

TL;DR

  • Build PROJ from source
  • Set PROJ_DIR
  • Copy $PROJDIR/src/proj.h to $PROJDIR/include
  • pip install pyproj

This was the initial situation :

$ pip install pyproj
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pyproj
  Using cached pyproj-3.5.0.tar.gz (223 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      proj executable not found. Please set the PROJ_DIR variable. For more information see: https://pyproj4.github.io/pyproj/stable/installation.html
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Then I tried to install the proj-bin package with apt but it looks like it's too old (7.2.1).

So I built PROJ from sources following instructions here .

I set PROJ_DIR to my build directory, then tried to pip install it :

$ pip install pyproj
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pyproj
  Using cached pyproj-3.5.0.tar.gz (223 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: certifi in /home/user/work/.venv/lib/python3.9/site-packages (from pyproj) (2022.12.7)
Building wheels for collected packages: pyproj
  Building wheel for pyproj (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for pyproj (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [64 lines of output]
      PROJ_DIR is set, using existing PROJ installation..
      
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-armv7l-cpython-39
      creating build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/datadir.py -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/aoi.py -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/transformer.py -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/geod.py -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/enums.py -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/exceptions.py -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/__main__.py -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/utils.py -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/_show_versions.py -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/network.py -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/proj.py -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/sync.py -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/__init__.py -> build/lib.linux-armv7l-cpython-39/pyproj
      creating build/lib.linux-armv7l-cpython-39/pyproj/crs
      copying pyproj/crs/enums.py -> build/lib.linux-armv7l-cpython-39/pyproj/crs
      copying pyproj/crs/_cf1x8.py -> build/lib.linux-armv7l-cpython-39/pyproj/crs
      copying pyproj/crs/datum.py -> build/lib.linux-armv7l-cpython-39/pyproj/crs
      copying pyproj/crs/coordinate_operation.py -> build/lib.linux-armv7l-cpython-39/pyproj/crs
      copying pyproj/crs/coordinate_system.py -> build/lib.linux-armv7l-cpython-39/pyproj/crs
      copying pyproj/crs/crs.py -> build/lib.linux-armv7l-cpython-39/pyproj/crs
      copying pyproj/crs/__init__.py -> build/lib.linux-armv7l-cpython-39/pyproj/crs
      copying pyproj/_compat.pyi -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/_transformer.pyi -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/_datadir.pyi -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/database.pyi -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/_network.pyi -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/_sync.pyi -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/list.pyi -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/_crs.pyi -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/_geod.pyi -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/py.typed -> build/lib.linux-armv7l-cpython-39/pyproj
      running build_ext
      building 'pyproj._geod' extension
      creating build/temp.linux-armv7l-cpython-39
      creating build/temp.linux-armv7l-cpython-39/pyproj
      arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/home/user/work/tmp/proj-9.2.0/build/include -I/home/user/work/.venv/include -I/usr/include/python3.9 -c pyproj/_geod.c -o build/temp.linux-armv7l-cpython-39/pyproj/_geod.o
      arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 build/temp.linux-armv7l-cpython-39/pyproj/_geod.o -L/home/user/work/tmp/proj-9.2.0/build/lib -L/usr/lib -Wl,--enable-new-dtags,-R/home/user/work/tmp/proj-9.2.0/build/lib -lproj -o build/lib.linux-armv7l-cpython-39/pyproj/_geod.cpython-39-arm-linux-gnueabihf.so
      building 'pyproj._crs' extension
      arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/home/user/work/tmp/proj-9.2.0/build/include -I/home/user/work/.venv/include -I/usr/include/python3.9 -c pyproj/_crs.c -o build/temp.linux-armv7l-cpython-39/pyproj/_crs.o
      pyproj/_crs.c: In function ‘__pyx_pf_6pyproj_4_crs_5Datum_6from_authority’:
      pyproj/_crs.c:16521:48: error: ‘PJ_CATEGORY_DATUM_ENSEMBLE’ undeclared (first use in this function); did you mean ‘PJ_TYPE_DATUM_ENSEMBLE’?
      16521 |       __pyx_t_6 = __Pyx_PyInt_From_PJ_CATEGORY(PJ_CATEGORY_DATUM_ENSEMBLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1406, __pyx_L3_error)
            |                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~
            |                                                PJ_TYPE_DATUM_ENSEMBLE
      pyproj/_crs.c:16521:48: note: each undeclared identifier is reported only once for each function it appears in
      pyproj/_crs.c: In function ‘__pyx_pf_6pyproj_4_crs_4_CRS_9type_name___get__’:
      pyproj/_crs.c:26166:40: error: ‘PJ_TYPE_DERIVED_PROJECTED_CRS’ undeclared (first use in this function); did you mean ‘PJ_TYPE_PROJECTED_CRS’?
      26166 |   __pyx_t_2 = ((__pyx_v_self->_type == PJ_TYPE_DERIVED_PROJECTED_CRS) != 0);
            |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            |                                        PJ_TYPE_PROJECTED_CRS
      pyproj/_crs.c: In function ‘__pyx_pymod_exec__crs’:
      pyproj/_crs.c:39258:40: error: ‘PJ_TYPE_DERIVED_PROJECTED_CRS’ undeclared (first use in this function); did you mean ‘PJ_TYPE_PROJECTED_CRS’?
      39258 |   __pyx_t_2 = __Pyx_PyInt_From_PJ_TYPE(PJ_TYPE_DERIVED_PROJECTED_CRS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2336, __pyx_L1_error)
            |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            |                                        PJ_TYPE_PROJECTED_CRS
      error: command '/usr/bin/arm-linux-gnueabihf-gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyproj
Failed to build pyproj
ERROR: Could not build wheels for pyproj, which is required to install pyproject.toml-based projects

Now the problem is that PJ_CATEGORY_DATUM_ENSEMBLE and PJ_TYPE_DERIVED_PROJECTED_CRS are not found...
They are declared in $PROJ_DIR/src/proj.h.

Then I copied $PROJ_DIR/src/proj.h to $PROJ_DIR/include and... it worked !

Maybe it can help to fix this issue...

@xbug42
Copy link

xbug42 commented Apr 12, 2023

I also hit the problem on a RaspberryPi 3 with Raspbian 11 (bullseye).

TL;DR

  • Build PROJ from source
  • Set PROJ_DIR
  • Copy $PROJDIR/src/proj.h to $PROJDIR/include
  • pip install pyproj

This was the initial situation :

$ pip install pyproj
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pyproj
  Using cached pyproj-3.5.0.tar.gz (223 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      proj executable not found. Please set the PROJ_DIR variable. For more information see: https://pyproj4.github.io/pyproj/stable/installation.html
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Then I tried to install the proj-bin package with apt but it looks like it's too old (7.2.1).

So I built PROJ from sources following instructions here .

I set PROJ_DIR to the main PROJ directory, then tried to pip install it :

$ pip install pyproj
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pyproj
  Using cached pyproj-3.5.0.tar.gz (223 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: certifi in /home/user/work/.venv/lib/python3.9/site-packages (from pyproj) (2022.12.7)
Building wheels for collected packages: pyproj
  Building wheel for pyproj (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for pyproj (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [64 lines of output]
      PROJ_DIR is set, using existing PROJ installation..
      
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-armv7l-cpython-39
      creating build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/datadir.py -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/aoi.py -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/transformer.py -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/geod.py -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/enums.py -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/exceptions.py -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/__main__.py -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/utils.py -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/_show_versions.py -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/network.py -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/proj.py -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/sync.py -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/__init__.py -> build/lib.linux-armv7l-cpython-39/pyproj
      creating build/lib.linux-armv7l-cpython-39/pyproj/crs
      copying pyproj/crs/enums.py -> build/lib.linux-armv7l-cpython-39/pyproj/crs
      copying pyproj/crs/_cf1x8.py -> build/lib.linux-armv7l-cpython-39/pyproj/crs
      copying pyproj/crs/datum.py -> build/lib.linux-armv7l-cpython-39/pyproj/crs
      copying pyproj/crs/coordinate_operation.py -> build/lib.linux-armv7l-cpython-39/pyproj/crs
      copying pyproj/crs/coordinate_system.py -> build/lib.linux-armv7l-cpython-39/pyproj/crs
      copying pyproj/crs/crs.py -> build/lib.linux-armv7l-cpython-39/pyproj/crs
      copying pyproj/crs/__init__.py -> build/lib.linux-armv7l-cpython-39/pyproj/crs
      copying pyproj/_compat.pyi -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/_transformer.pyi -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/_datadir.pyi -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/database.pyi -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/_network.pyi -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/_sync.pyi -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/list.pyi -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/_crs.pyi -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/_geod.pyi -> build/lib.linux-armv7l-cpython-39/pyproj
      copying pyproj/py.typed -> build/lib.linux-armv7l-cpython-39/pyproj
      running build_ext
      building 'pyproj._geod' extension
      creating build/temp.linux-armv7l-cpython-39
      creating build/temp.linux-armv7l-cpython-39/pyproj
      arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/home/user/work/tmp/proj-9.2.0/include -I/home/user/work/.venv/include -I/usr/include/python3.9 -c pyproj/_geod.c -o build/temp.linux-armv7l-cpython-39/pyproj/_geod.o
      arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 build/temp.linux-armv7l-cpython-39/pyproj/_geod.o -L/home/user/work/tmp/proj-9.2.0/lib -L/usr/lib -Wl,--enable-new-dtags,-R/home/user/work/tmp/proj-9.2.0/lib -lproj -o build/lib.linux-armv7l-cpython-39/pyproj/_geod.cpython-39-arm-linux-gnueabihf.so
      building 'pyproj._crs' extension
      arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/home/user/work/tmp/proj-9.2.0/include -I/home/user/work/.venv/include -I/usr/include/python3.9 -c pyproj/_crs.c -o build/temp.linux-armv7l-cpython-39/pyproj/_crs.o
      pyproj/_crs.c: In function ‘__pyx_pf_6pyproj_4_crs_5Datum_6from_authority’:
      pyproj/_crs.c:16521:48: error: ‘PJ_CATEGORY_DATUM_ENSEMBLE’ undeclared (first use in this function); did you mean ‘PJ_TYPE_DATUM_ENSEMBLE’?
      16521 |       __pyx_t_6 = __Pyx_PyInt_From_PJ_CATEGORY(PJ_CATEGORY_DATUM_ENSEMBLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1406, __pyx_L3_error)
            |                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~
            |                                                PJ_TYPE_DATUM_ENSEMBLE
      pyproj/_crs.c:16521:48: note: each undeclared identifier is reported only once for each function it appears in
      pyproj/_crs.c: In function ‘__pyx_pf_6pyproj_4_crs_4_CRS_9type_name___get__’:
      pyproj/_crs.c:26166:40: error: ‘PJ_TYPE_DERIVED_PROJECTED_CRS’ undeclared (first use in this function); did you mean ‘PJ_TYPE_PROJECTED_CRS’?
      26166 |   __pyx_t_2 = ((__pyx_v_self->_type == PJ_TYPE_DERIVED_PROJECTED_CRS) != 0);
            |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            |                                        PJ_TYPE_PROJECTED_CRS
      pyproj/_crs.c: In function ‘__pyx_pymod_exec__crs’:
      pyproj/_crs.c:39258:40: error: ‘PJ_TYPE_DERIVED_PROJECTED_CRS’ undeclared (first use in this function); did you mean ‘PJ_TYPE_PROJECTED_CRS’?
      39258 |   __pyx_t_2 = __Pyx_PyInt_From_PJ_TYPE(PJ_TYPE_DERIVED_PROJECTED_CRS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2336, __pyx_L1_error)
            |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            |                                        PJ_TYPE_PROJECTED_CRS
      error: command '/usr/bin/arm-linux-gnueabihf-gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyproj
Failed to build pyproj
ERROR: Could not build wheels for pyproj, which is required to install pyproject.toml-based projects

Now the problem is that PJ_CATEGORY_DATUM_ENSEMBLE and PJ_TYPE_DERIVED_PROJECTED_CRS are not found...
They are declared in $PROJ_DIR/src/proj.h.

Then I copied $PROJ_DIR/src/proj.h to $PROJ_DIR/include and... it worked !

@snowman2 Maybe it can help to fix this issue...

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

No branches or pull requests

5 participants