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

Unable to run on Windows with Python 3.12 #81

Open
Blazeflack opened this issue Apr 14, 2024 · 0 comments
Open

Unable to run on Windows with Python 3.12 #81

Blazeflack opened this issue Apr 14, 2024 · 0 comments

Comments

@Blazeflack
Copy link

Blazeflack commented Apr 14, 2024

I am unable to use this package on Windows, despite it being flagged as "OS Independent" on the PyPi package page.

Error:

PS D:\Test picopt> picopt ?
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\<REDACTED>\AppData\Local\Programs\Python\Python312\Scripts\picopt.exe\__main__.py", line 4, in <module>
  File "C:\Users\<REDACTED>\AppData\Local\Programs\Python\Python312\Lib\site-packages\picopt\cli.py", line 9, in <module>
    from picopt import PROGRAM_NAME, walk
  File "C:\Users\<REDACTED>\AppData\Local\Programs\Python\Python312\Lib\site-packages\picopt\walk.py", line 17, in <module>
    from picopt.handlers.factory import create_handler
  File "C:\Users\<REDACTED>\AppData\Local\Programs\Python\Python312\Lib\site-packages\picopt\handlers\factory.py", line 27, in <module>
    from picopt.pillow.webp_lossless import is_lossless
  File "C:\Users\<REDACTED>\AppData\Local\Programs\Python\Python312\Lib\site-packages\picopt\pillow\webp_lossless.py", line 8, in <module>
    from mmap import PROT_READ, mmap
ImportError: cannot import name 'PROT_READ' from 'mmap' (unknown location)

I have Python 3.12 installed, and I installed picopt using 'pip'. The installation succeeded without any warnings.

From what I was able to gather, mmap is a Linux-only utility.

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