cultionet
cultionet copied to clipboard
[bug] Possible binary incompatibility numpy==1.21.0
I get the following error running "cultionet create", updating Numpy fixes the error, but I am not sure if that update causes my other issues.
Traceback (most recent call last):
File "/home/matthew/.pyenv/versions/cultionet2/bin/cultionet", line 5, in
This looks like geowombat
and cultionet
were compiled with different numpy versions. Since cultionet
is pinned to numpy==1.21.0
, you can try:
pyenv activate your.venv
(your.venv) pip uninstall geowombat -y
(your.venv) cd cultionet/
# Re-install cultionet, which will install geowombat and should use numpy==1.21.0 since it's already installed
(your.venv) pip install .
My guess is that geowombat
was installed first and used the most recent version of numpy
.
If that works for you, I can modify the install instructions to first install numpy
. As a reference, the most up-to-date install steps can be found in the CircleCI config file.
That would make sense! Why does cultionet need GDAL 3.2.1? (I am guessing that is part of why I need an earlier version of geowombat, when I install gdal 3.2.1 geowombat 1.7.4 gets mad, but cultionet is mad if I have gdal 3.3.2) I've been running cultionet with GDAL 3.3.2 without much issue, but that might have been the cause of some of the other problems that I had
I still needed up update numpy with the fresh install, with geowombat 1.8.5 I also ran into an error with a cython compiled file:
File "src/geowombat/moving/_moving.pyx", line 1, in init geowombat.moving._moving
ImportError: numpy.core.multiarray failed to import (auto-generated because you didn't call 'numpy.import_array()' after cimporting numpy; use '
I added np._import_array to the file suggested, and it works after reinstalling geowombat
I think I see what is going on with GDAL, geowombat wants the version of GDAL for whatever version the GDAL binaries are, and in my case that is 3.3.2.
Ah, yes, your Python GDAL version should match your GDAL binaries version.