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

Depreciated dependency on python 3.12 (numpy.distutils) causes error on import #305

Open
Gerrit-Hoving opened this issue Dec 20, 2024 · 0 comments

Comments

@Gerrit-Hoving
Copy link

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

import rasterstats
@Gerrit-Hoving 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant