GuidoBartoli / sherloq

An open-source digital image forensic toolset
GNU General Public License v3.0
2.65k stars 249 forks source link

On Windows I get: ERROR: No matching distribution found for rawpy==0.17.* #102

Closed sicklittlemonkey closed 1 month ago

sicklittlemonkey commented 2 months ago

Is python 3.11 still supported? I'm not a python guy, sorry. Wish the project was still C++ ; - )

pip install -r requirements.txt
Collecting astor==0.8.* (from -r requirements.txt (line 1))
  Obtaining dependency information for astor==0.8.* from https://files.pythonhosted.org/packages/c3/88/97eef84f48fa04fbd6750e62dcceafba6c63c81b7ac1420856c8dcc0a3f9/astor-0.8.1-py2.py3-none-any.whl.metadata
  Downloading astor-0.8.1-py2.py3-none-any.whl.metadata (4.2 kB)
Collecting concurrent-iterator==0.2.* (from -r requirements.txt (line 2))
  Obtaining dependency information for concurrent-iterator==0.2.* from https://files.pythonhosted.org/packages/22/c9/db1b68c2bec17f6ba2b32bac4f151f55de806a821fb2f728563c02dffbb8/concurrent_iterator-0.2.6-py2.py3-none-any.whl.metadata
  Downloading concurrent_iterator-0.2.6-py2.py3-none-any.whl.metadata (1.1 kB)
Collecting keras-applications==1.0.* (from -r requirements.txt (line 3))
  Obtaining dependency information for keras-applications==1.0.* from https://files.pythonhosted.org/packages/71/e3/19762fdfc62877ae9102edf6342d71b28fbfd9dea3d2f96a882ce099b03f/Keras_Applications-1.0.8-py3-none-any.whl.metadata
  Downloading Keras_Applications-1.0.8-py3-none-any.whl.metadata (1.7 kB)
Collecting lxml==4.9.* (from -r requirements.txt (line 4))
  Obtaining dependency information for lxml==4.9.* from https://files.pythonhosted.org/packages/5f/df/6d15cc415e04724ba4c141051cf43709e09bbcdd9868a6c2e7a7073ef498/lxml-4.9.4-cp312-cp312-win_amd64.whl.metadata
  Downloading lxml-4.9.4-cp312-cp312-win_amd64.whl.metadata (3.8 kB)
Collecting matplotlib==3.8.* (from -r requirements.txt (line 5))
  Obtaining dependency information for matplotlib==3.8.* from https://files.pythonhosted.org/packages/7d/ca/e7bd1876a341ed8c456095962a582696cac1691cb6e55bd5ead15a755c5d/matplotlib-3.8.4-cp312-cp312-win_amd64.whl.metadata
  Downloading matplotlib-3.8.4-cp312-cp312-win_amd64.whl.metadata (5.9 kB)
Collecting opencv-contrib-python-headless==4.* (from -r requirements.txt (line 6))
  Obtaining dependency information for opencv-contrib-python-headless==4.* from https://files.pythonhosted.org/packages/01/d4/dacf890940cb22279e1513b7ea41d97825a723153a5efce68bc52e7b3b6e/opencv_contrib_python_headless-4.10.0.84-cp37-abi3-win_amd64.whl.metadata
  Downloading opencv_contrib_python_headless-4.10.0.84-cp37-abi3-win_amd64.whl.metadata (20 kB)
Collecting pandas==1.5.* (from -r requirements.txt (line 7))
  Downloading pandas-1.5.3.tar.gz (5.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.2/5.2 MB 2.0 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting pyside6==6.7.* (from -r requirements.txt (line 8))
  Obtaining dependency information for pyside6==6.7.* from https://files.pythonhosted.org/packages/c2/ee/15cb7e277b3c88806d9baaa334b7923b2f1bdc461b38461bc70d368a8481/PySide6-6.7.2-cp39-abi3-win_amd64.whl.metadata
  Downloading PySide6-6.7.2-cp39-abi3-win_amd64.whl.metadata (5.5 kB)
Collecting python-magic==0.4.* (from -r requirements.txt (line 9))
  Obtaining dependency information for python-magic==0.4.* from https://files.pythonhosted.org/packages/6c/73/9f872cb81fc5c3bb48f7227872c28975f998f3e7c2b1c16e95e6432bbb90/python_magic-0.4.27-py2.py3-none-any.whl.metadata
  Downloading python_magic-0.4.27-py2.py3-none-any.whl.metadata (5.8 kB)

Then the errors:

ERROR: Ignored the following versions that require a different python version: 6.3.0 Requires-Python <3.11,>=3.6; 6.3.1 Requires-Python <3.11,>=3.6; 6.3.2 Requires-Python <3.11,>=3.6; 6.4.0 Requires-Python <3.11,>=3.6; 6.4.0.1 Requires-Python <3.12,>=3.7; 6.4.1 Requires-Python <3.12,>=3.7; 6.4.2 Requires-Python <3.12,>=3.7; 6.4.3 Requires-Python <3.12,>=3.7; 6.5.0 Requires-Python <3.12,>=3.7; 6.5.1 Requires-Python <3.12,>=3.7; 6.5.1.1 Requires-Python <3.12,>=3.7; 6.5.2 Requires-Python <3.12,>=3.7; 6.5.3 Requires-Python <3.12,>=3.7
ERROR: Could not find a version that satisfies the requirement rawpy==0.17.* (from versions: 0.19.0, 0.19.1, 0.20.0, 0.21.0, 0.22.0)
ERROR: No matching distribution found for rawpy==0.17.*
sicklittlemonkey commented 2 months ago

I upgraded to python 3.12.5 but got exactly the same error.

So I did the obvious and tweaked the requirement to rawpy==0.19.* which allowed the install to complete.

But now I get the following error when running:

python sherloq.py
Traceback (most recent call last):
  File "C:\Users\user\source\repos\sherloq-GuidoBartoli\gui\sherloq.py", line 19, in <module>
    from digest import DigestWidget
  File "C:\Users\user\source\repos\sherloq-GuidoBartoli\gui\digest.py", line 5, in <module>
    import magic
  File "C:\Users\user\source\repos\sherloq-GuidoBartoli\gui\.venv\Lib\site-packages\magic\__init__.py", line 209, in <module>
    libmagic = loader.load_lib()
               ^^^^^^^^^^^^^^^^^
  File "C:\Users\user\source\repos\sherloq-GuidoBartoli\gui\.venv\Lib\site-packages\magic\loader.py", line 49, in load_lib
    raise ImportError('failed to find libmagic.  Check your installation')
ImportError: failed to find libmagic.  Check your installation

Any tips from python pros appreciated.

sicklittlemonkey commented 2 months ago

On Ubuntu I had to make the same change in requirements.txt: rawpy==0.19.*

And then it ran OK with python 3.12 with the following warning:

python3.12 sherloq.py
WARNING:tensorflow:From /home/user/dev/sherloq/gui/.venv/lib/python3.12/site-packages/tensorflow/python/compat/v2_compat.py:98: disable_resource_variables (from tensorflow.python.ops.resource_variables_toggle) is deprecated and will be removed in a future version.
Instructions for updating:
non-resource variables are not supported in the long term

Thanks for the cool software!

GuidoBartoli commented 1 month ago

Thanks for this test, I will verify if rawpy==0.19.* works on Linux too and in that case I will update the requirements.

GuidoBartoli commented 1 month ago

Should be fixed in 329dc57cf30a1877e5f4b9f241ac433115c9947d.