Avi Tshuva
Avi Tshuva

Reputation: 264

pyproj fails to compile when i pip install it. And it's not about gcc

It throws errors that make it seems like there's something really wrong about the code, such as :

 _proj.c:7486:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
     tstate->exc_type = local_type;
             ^~~~~~~~
             curexc_type
_proj.c:7487:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
     tstate->exc_value = local_value;
             ^~~~~~~~~
             curexc_value
_proj.c:7488:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
     tstate->exc_traceback = local_tb;

It is pyproj version 1.9.5.1

Upvotes: 5

Views: 2930

Answers (1)

ehacinom
ehacinom

Reputation: 8894

These files are generated by Cython. Try upgrading Cython to the version that supports your Python and regenerate files. (Cython >= 0.27.3 for Python 3.7)

EDIT:

This thread recommends installing pyproj by pointing to the git repo of pyproj.

pipenv install cython
pipenv install git+https://github.com/jswhit/pyproj.git#egg=pyproj

By installing from Git, Cython will recompile necessary c files.

Upvotes: 5

Related Questions