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

Release the wheels for Python 3.12 #6

Closed
oevesque opened this issue Oct 3, 2023 · 6 comments
Closed

Release the wheels for Python 3.12 #6

oevesque opened this issue Oct 3, 2023 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@oevesque
Copy link

oevesque commented Oct 3, 2023

Can I install it with pip on python 3.12 ?
I've got the error:

C:\Users\XXX\Downloads\mozjpeg-lossless-optimization>pip install mozjpeg-lossless-optimization
Collecting mozjpeg-lossless-optimization
  Using cached mozjpeg-lossless-optimization-1.1.2.tar.gz (1.0 MB)
  Preparing metadata (setup.py) ... done
Collecting cffi>=1.0.0 (from mozjpeg-lossless-optimization)
  Obtaining dependency information for cffi>=1.0.0 from https://files.pythonhosted.org/packages/e9/63/e285470a4880a4f36edabe4810057bd4b562c6ddcc165eacf9c3c7210b40/cffi-1.16.0-cp312-cp312-win_amd64.whl.metadata
  Using cached cffi-1.16.0-cp312-cp312-win_amd64.whl.metadata (1.5 kB)
Collecting pycparser (from cffi>=1.0.0->mozjpeg-lossless-optimization)
  Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Using cached cffi-1.16.0-cp312-cp312-win_amd64.whl (181 kB)
Building wheels for collected packages: mozjpeg-lossless-optimization
  Building wheel for mozjpeg-lossless-optimization (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [24 lines of output]
      C:\Users\XXX\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\__init__.py:80: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
      !!

              ********************************************************************************
              Requirements should be satisfied by a PEP 517 installer.
              If you are using pip, you can try `pip install --use-pep517`.
              ********************************************************************************

      !!
        dist.fetch_build_eggs(dist.setup_requires)
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-312
      creating build\lib.win-amd64-cpython-312\mozjpeg_lossless_optimization
      copying mozjpeg_lossless_optimization\mozjpeg_opti.py -> build\lib.win-amd64-cpython-312\mozjpeg_lossless_optimization
      copying mozjpeg_lossless_optimization\mozjpeg_opti_build.py -> build\lib.win-amd64-cpython-312\mozjpeg_lossless_optimization
      copying mozjpeg_lossless_optimization\__init__.py -> build\lib.win-amd64-cpython-312\mozjpeg_lossless_optimization
      running build_ext
      generating cffi module 'build\\temp.win-amd64-cpython-312\\Release\\mozjpeg_lossless_optimization._mozjpeg_opti.c'
      creating build\temp.win-amd64-cpython-312
      creating build\temp.win-amd64-cpython-312\Release
      error: [WinError 2] Le fichier spécifié est introuvable
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for mozjpeg-lossless-optimization
  Running setup.py clean for mozjpeg-lossless-optimization
Failed to build mozjpeg-lossless-optimization
ERROR: Could not build wheels for mozjpeg-lossless-optimization, which is required to install pyproject.toml-based projects"

I've try multiple update, but I stil can't install it.
It's a fresh python 3.12 installation on a new computer.

@flozz
Copy link
Member

flozz commented Oct 5, 2023

It worked for me with Python 3.12 on Windows 10:

image

But as I do not released the wheels for Python 3.12 yet, you have to install Visual Studio with everything needed to compile C code...

@flozz flozz self-assigned this Oct 5, 2023
@flozz flozz added the enhancement New feature or request label Oct 5, 2023
@flozz flozz changed the title Install Error for Pyhton 3.12 Release the wheels for Python 3.12 Oct 5, 2023
@oevesque
Copy link
Author

oevesque commented Oct 5, 2023

I'm on Windows 11.
But as I don't know what wheels is and I have no idea how to compile C stuff, I will downgrade to python 3.11

@flozz
Copy link
Member

flozz commented Oct 5, 2023

Currently there is two types of packages for Python:

  • sdist, a.k.a source distribution : contains only source code. If it is a pure python package there is no issue using this but if the package contains C code (or Rust or other), it requires some additional stuff to install it as it will need to compile this code...
  • bdist_wheel: when the package contains code in other languages than Python, the Wheels contains pre-compiled version of those code (lib.dll, etc on Windows). A wheel must be compiled for each OS / Python version / Architecture combination.

For MozJPEG Lossless Optimization, you can see all of them here: https://pypi.org/project/mozjpeg-lossless-optimization/#files

when you run pip install mozjpeg-lossless-optimization, pip will first search for a wheel compatible with your system (OS/Py version/Architecture). If it cannot find one, it will use the sdist package instead.


Anyway don't worry I am working to publish wheels for Python 3.12 right now :)

@flozz
Copy link
Member

flozz commented Oct 5, 2023

The build of the wheels is in progress:

https://github.com/wanadev/mozjpeg-lossless-optimization/actions/runs/6421363634

Packages should be automatically published if everything goes fine... :)

@oevesque
Copy link
Author

oevesque commented Oct 5, 2023

merci beaucoup, ca fonctionne déjà 👍

@flozz
Copy link
Member

flozz commented Oct 6, 2023

Packages have been published successfully :)

@flozz flozz closed this as completed Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants