You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Attempting to import rasterstats on Python 3.12 results in the following error:
File ~/.conda/envs/comps/lib/python3.12/site-packages/rasterstats/main.py:8
import numpy.distutils.system_info as sysinfo
ModuleNotFoundError: No module named 'numpy.distutils'
To Reproduce
I was able to reproduce this error on both Windows 11 and Linux (arch) by creating a new anaconda env with the latest python version, installing spyder and rasterstats, and attempting to import rasterstats into my script in spyder
importrasterstats
The text was updated successfully, but these errors were encountered:
Gerrit-Hoving
changed the title
Depreciated dependency on python 3.12 (numpy.distutils)
Depreciated dependency on python 3.12 (numpy.distutils) causes error on import
Dec 20, 2024
Describe the bug
Attempting to import rasterstats on Python 3.12 results in the following error:
File ~/.conda/envs/comps/lib/python3.12/site-packages/rasterstats/main.py:8
import numpy.distutils.system_info as sysinfo
ModuleNotFoundError: No module named 'numpy.distutils'
I believe that this is because numpy.distutils has been depreciated and removed as of Python 3.12 (https://numpy.org/doc/2.1/reference/distutils_status_migration.html#distutils-status-migration).
To Reproduce
I was able to reproduce this error on both Windows 11 and Linux (arch) by creating a new anaconda env with the latest python version, installing spyder and rasterstats, and attempting to import rasterstats into my script in spyder
The text was updated successfully, but these errors were encountered: