ukhsa-collaboration / pygom

ODE modelling in Python
GNU General Public License v2.0
27 stars 20 forks source link

Problem after update on Ubuntu 22.04/ Python 3.10 #63

Closed lgostiau closed 1 month ago

lgostiau commented 2 years ago

Hello, I just did the upgrade to 22.04 LTS, I was using PyGom for a covid-related project (very useful library btw). Unfortunately the installation on Python3.10 seems to be broken. I get the following error during gcc compilation pygom/model/_tau_leap.c: In function ‘__pyx_tp_dealloc_array’: pygom/model/_tau_leap.c:18375:5: error: lvalue required as increment operand 18375 | ++Py_REFCNT(o); | ^~ Has anyone installed successfully the library on Ubuntu 22.04 with Python 3.10 ?

twomagpi commented 1 month ago

Hi, looks to be an error with how Cython wants to build that function. I think if you simply delete pygom/model/_tau_leap.c then Cython will correctly regenerate it to match your system from pygom/model/_tau_leap.pyx.

That said with #114 you should be able to avoid quite a bit of that pain as PyPI now has binary (pre-compiled) wheels for Linux and Windows.