protectai / modelscan

Protection against Model Serialization Attacks
http://modelscan.ai
Apache License 2.0
312 stars 67 forks source link

ModelScan fails to install on Python 3.12 #178

Closed mmaitre314 closed 3 months ago

mmaitre314 commented 3 months ago

Describe the bug

pip install of modelscan==0.7.6 on Python 3.12 fails with:

File "<snip>\Temp\pip-build-env-f6iksg8f\overlay\Lib\site-packages\pkg_resources\__init__.py", line 2172, in <module>
          register_finder(pkgutil.ImpImporter, find_on_path)
                          ^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'.

Per SO, the fix is to install numpy==1.26.4: https://stackoverflow.com/a/77364602/3783926

This is however not compatible with the dependencies defined in ModelScan:

ERROR: Cannot install -r requirements.txt (line 1) and numpy==1.26.4 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested numpy==1.26.4
    modelscan 0.7.6 depends on numpy==1.24.0

Could ModelScan expand the supported versions of numpy?

To Reproduce

pip install modelscan==0.7.6 on Python 3.12

Expected behavior

Install succeeds.

Screenshots N/A

Environment (please complete the following information):

Additional context

N/A

seanpmorgan commented 3 months ago

Thanks @mmaitre314 for the report. We'll resolve