py7zr
py7zr copied to clipboard
py7zr fails to install on python 3.13
Describe the bug
py7zr installation fails on python 3.13 because 2 of its dependencies do not have wheels for python 3.13:
- https://pypi.org/project/pyppmd/#files
- https://pypi.org/project/inflate64/#files
This means that installing py7zr requires an environment that can build those dependencies.
To Reproduce
$ python --version
Python 3.13.2
$ python -m pip list
Package Version
------- -------
pip 25.0.1
$ python -m pip install py7zr
Collecting py7zr
Downloading py7zr-0.22.0-py3-none-any.whl.metadata (16 kB)
Collecting texttable (from py7zr)
Using cached texttable-1.7.0-py2.py3-none-any.whl.metadata (9.8 kB)
Collecting pycryptodomex>=3.16.0 (from py7zr)
Downloading pycryptodomex-3.22.0-cp37-abi3-win_amd64.whl.metadata (3.4 kB)
Collecting pyzstd>=0.15.9 (from py7zr)
Downloading pyzstd-0.16.2-cp313-cp313-win_amd64.whl.metadata (2.5 kB)
Collecting pyppmd<1.2.0,>=1.1.0 (from py7zr)
Downloading pyppmd-1.1.1.tar.gz (1.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3/1.3 MB 10.2 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting pybcj<1.1.0,>=1.0.0 (from py7zr)
Downloading pybcj-1.0.3-cp313-cp313-win_amd64.whl.metadata (4.0 kB)
Collecting multivolumefile>=0.2.3 (from py7zr)
Using cached multivolumefile-0.2.3-py3-none-any.whl.metadata (6.3 kB)
Collecting inflate64<1.1.0,>=1.0.0 (from py7zr)
Downloading inflate64-1.0.1.tar.gz (896 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 896.1/896.1 kB 8.5 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting brotli>=1.1.0 (from py7zr)
Downloading Brotli-1.1.0-cp313-cp313-win_amd64.whl.metadata (5.6 kB)
Collecting psutil (from py7zr)
Downloading psutil-7.0.0-cp37-abi3-win_amd64.whl.metadata (23 kB)
Downloading py7zr-0.22.0-py3-none-any.whl (67 kB)
Downloading Brotli-1.1.0-cp313-cp313-win_amd64.whl (358 kB)
Using cached multivolumefile-0.2.3-py3-none-any.whl (17 kB)
Downloading pybcj-1.0.3-cp313-cp313-win_amd64.whl (24 kB)
Downloading pycryptodomex-3.22.0-cp37-abi3-win_amd64.whl (1.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 11.2 MB/s eta 0:00:00
Downloading pyzstd-0.16.2-cp313-cp313-win_amd64.whl (245 kB)
Downloading psutil-7.0.0-cp37-abi3-win_amd64.whl (244 kB)
Using cached texttable-1.7.0-py2.py3-none-any.whl (10 kB)
Building wheels for collected packages: inflate64, pyppmd
Building wheel for inflate64 (pyproject.toml) ... done
Created wheel for inflate64: filename=inflate64-1.0.1-cp313-cp313-win_amd64.whl size=35336 sha256=7e31540933b086a93e3c5e45a89d0e8dd4dca12c91ea387c3016b52ca6f41bbb
Stored in directory: c:\users\raven\appdata\local\pip\cache\wheels\be\f7\79\7698a9ba6dff4c48de5b0b868634c8d4453a9e699d5962f69e
Building wheel for pyppmd (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pyppmd (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [122 lines of output]
C:\Users\raven\AppData\Local\Temp\pip-build-env-36n2bhlp\overlay\Lib\site-packages\setuptools_scm\git.py:310: UserWarning: git archive did not support describe output
warnings.warn("git archive did not support describe output")
C:\Users\raven\AppData\Local\Temp\pip-build-env-36n2bhlp\overlay\Lib\site-packages\setuptools_scm\git.py:328: UserWarning: unprocessed git archival found (no export subst applied)
warnings.warn("unprocessed git archival found (no export subst applied)")
C:\Users\raven\AppData\Local\Temp\pip-build-env-36n2bhlp\overlay\Lib\site-packages\setuptools\config\_apply_pyprojecttoml.py:82: SetuptoolsDeprecationWarning: `project.license` as a TOML table is deprecated
!!
********************************************************************************
Please use a simple string containing a SPDX expression for `project.license`. You can also use `project.license-files`.
By 2026-Feb-18, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
corresp(dist, value, root_dir)
C:\Users\raven\AppData\Local\Temp\pip-build-env-36n2bhlp\overlay\Lib\site-packages\setuptools\config\_apply_pyprojecttoml.py:61: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
dist._finalize_license_expression()
C:\Users\raven\AppData\Local\Temp\pip-build-env-36n2bhlp\overlay\Lib\site-packages\setuptools\dist.py:760: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
self._finalize_license_expression()
running bdist_wheel
running build
running build_py
creating build\lib.win-amd64-cpython-313\pyppmd
copying src\pyppmd\__init__.py -> build\lib.win-amd64-cpython-313\pyppmd
creating build\lib.win-amd64-cpython-313\pyppmd\c
copying src\pyppmd\c\c_ppmd.py -> build\lib.win-amd64-cpython-313\pyppmd\c
running egg_info
writing src\pyppmd.egg-info\PKG-INFO
writing dependency_links to src\pyppmd.egg-info\dependency_links.txt
writing requirements to src\pyppmd.egg-info\requires.txt
writing top-level names to src\pyppmd.egg-info\top_level.txt
writing manifest file 'src\pyppmd.egg-info\SOURCES.txt'
ERROR setuptools_scm._file_finders.git listing git files failed - pretending there aren't any
reading manifest file 'src\pyppmd.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'tox.ini'
warning: no previously-included files found matching '.gitignore'
warning: no previously-included files found matching '.gitattributes'
warning: no previously-included files found matching '.woodpecker.yml'
no previously-included directories found matching 'ci'
no previously-included directories found matching 'issue_template'
adding license file 'LICENSE'
writing manifest file 'src\pyppmd.egg-info\SOURCES.txt'
C:\Users\raven\AppData\Local\Temp\pip-build-env-36n2bhlp\overlay\Lib\site-packages\setuptools\command\build_py.py:212: _Warning: Package 'pyppmd.cffi' is absent from the `packages` configuration.
!!
********************************************************************************
############################
# Package would be ignored #
############################
Python recognizes 'pyppmd.cffi' as an importable package[^1],
but it is absent from setuptools' `packages` configuration.
This leads to an ambiguous overall configuration. If you want to distribute this
package, please make sure that 'pyppmd.cffi' is explicitly added
to the `packages` configuration field.
Alternatively, you can also rely on setuptools' discovery methods
(for example by using `find_namespace_packages(...)`/`find_namespace:`
instead of `find_packages(...)`/`find:`).
You can read more about "package discovery" on setuptools documentation page:
- https://setuptools.pypa.io/en/latest/userguide/package_discovery.html
If you don't want 'pyppmd.cffi' to be distributed and are
already explicitly excluding 'pyppmd.cffi' via
`find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
you can try to use `exclude_package_data`, or `include-package-data=False` in
combination with a more fine grained `package-data` configuration.
You can read more about "package data files" on setuptools documentation page:
- https://setuptools.pypa.io/en/latest/userguide/datafiles.html
[^1]: For Python, any directory (with suitable naming) can be imported,
even if it does not contain any `.py` files.
On the other hand, currently there is no concept of package data
directory, all directories are treated like packages.
********************************************************************************
!!
check.warn(importable)
copying src\pyppmd\py.typed -> build\lib.win-amd64-cpython-313\pyppmd
creating build\lib.win-amd64-cpython-313\pyppmd\cffi
copying src\pyppmd\cffi\cffi_ppmd.py -> build\lib.win-amd64-cpython-313\pyppmd\cffi
running build_ext
building 'pyppmd.c._ppmd' extension
creating build\temp.win-amd64-cpython-313\Release\src\ext
creating build\temp.win-amd64-cpython-313\Release\src\lib\buffer
creating build\temp.win-amd64-cpython-313\Release\src\lib\ppmd
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Isrc/lib/ppmd -Isrc/lib/buffer -IC:\Users\raven\Documents\GitHub\junkenv\.venv\include -IC:\Users\raven\AppData\Roaming\uv\python\cpython-3.13.2-windows-x86_64-none\include -IC:\Users\raven\AppData\Roaming\uv\python\cpython-3.13.2-windows-x86_64-none\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" /Tcsrc/ext/_ppmdmodule.c /Fobuild\temp.win-amd64-cpython-313\Release\src\ext\_ppmdmodule.obj /GF /Gy
_ppmdmodule.c
src/ext/_ppmdmodule.c(856): error C2059: syntax error: '}'
src/ext/_ppmdmodule.c(1581): error C2059: syntax error: '}'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.38.33130\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pyppmd
Successfully built inflate64
Failed to build pyppmd
ERROR: Failed to build installable wheels for some pyproject.toml based projects (pyppmd)
Expected behavior Publish pyppmd and inflate64 wheels so py7zr installation works on 3.13.
Environment (please complete the following information):
- OS: Windows 11
- Python 3.13
- py7zr version: 0.22.0
I had same problem, there is a fix for windows build in pyppmd, but it is not released yet.
You have to install pyppmd from main:
pip install git+https://codeberg.org/miurahr/pyppmd@main
Sure, but that still requires user's machine to build it. This issue is more of a request to publish 3.13 wheels for the dependencies since both of them are published by @miurahr.
@Ravencentric Thanks for heading me up to pyppmd. I will work on it soon.
I just realised I mentioned pyppmd twice and forgot to include inflate64. That also needs a 3.13 wheel. Edited the original post to fix that.
@miurahr also ref https://github.com/jurplel/install-qt-action/issues/279#issuecomment-2743833745
cibuildwheel==2.16.2 doesn't have Python 3.13 support, so you'll have to probably bump below to 2.23.1
https://codeberg.org/miurahr/pyppmd/src/commit/28a3c97ccc711598ea40a298878829cdf2b36a77/ci/azure-pipelines/CodeBerg-pyppmd-CI.yml#L113
https://codeberg.org/miurahr/pyppmd/src/commit/28a3c97ccc711598ea40a298878829cdf2b36a77/ci/azure-pipelines/CodeBerg-pyppmd-CI.yml#L146
py7zr
- https://github.com/miurahr/py7zr/pull/641
- https://github.com/miurahr/py7zr/pull/642
inflate64
- https://github.com/miurahr/inflate64/pull/1
pyppmd
- https://github.com/miurahr/pyppmd/pull/119
~@miurahr Do any of the dependencies need to be refreshed/bumped? https://github.com/miurahr/py7zr/blob/master/pyproject.toml~
dependabot looks after things, I see....
hi! what's the status of this? I see that the last stable release (0.22.0) is not supporting py3.13. Is it safe to install v1.0.0rc3?
@lucasrodes I use 1.0.0rc3 on my project, and did some unit tests (compress/decompress 7z files, with and without password), and for now it works well
@adrienyhuel thanks for weighing in. Do you use python 3.13? I am experiencing errors when installing the library, because of some of its dependencies. Now I'm stucked with inflate64... I'm debugging and partially looking for alternatives for 7z extract libraries.
$ trap 'kill -- $$' INT TERM QUIT; set -x
--
| cd lib/datautils
| PYTHON_VERSION=3.13 make .venv
| make -j 4 test
| + cd lib/datautils
| + PYTHON_VERSION=3.13
| + make .venv
| ==> UV not found. Installing...
| downloading uv 0.7.7 x86_64-unknown-linux-gnu
| Built owid-datautils @ file:///var/lib/buildkite-agent/builds/etl-build-2-14/our-error: Failed to prepare distributions
| Caused by: Failed to download and build `inflate64==1.0.1`
| Caused by: Build backend failed to build wheel through `build_wheel` (exit status: 1)
|
| [stdout]
| running bdist_wheel
| running build
| running build_py
| creating build/lib.linux-x86_64-cpython-313/inflate64
| copying src/inflate64/__init__.py -> build/lib.linux-x86_64-cpython-313/inflate64
| running egg_info
| writing src/inflate64.egg-info/PKG-INFO
| writing dependency_links to src/inflate64.egg-info/dependency_links.txt
| writing requirements to src/inflate64.egg-info/requires.txt
| writing top-level names to src/inflate64.egg-info/top_level.txt
| writing manifest file 'src/inflate64.egg-info/SOURCES.txt'
| reading manifest file 'src/inflate64.egg-info/SOURCES.txt'
| reading manifest template 'MANIFEST.in'
| adding license file 'COPYING'
| writing manifest file 'src/inflate64.egg-info/SOURCES.txt'
| copying src/inflate64/py.typed -> build/lib.linux-x86_64-cpython-313/inflate64
| running build_ext
| building 'inflate64._inflate64' extension
| creating build/temp.linux-x86_64-cpython-313/src/ext
| creating build/temp.linux-x86_64-cpython-313/src/lib
| clang -pthread -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -fPIC -fPIC -Isrc/lib -Isrc/ext -I/var/lib/buildkite-agent/.cache/uv/builds-v0/.tmpJ7jWso/include -I/var/lib/buildkite-agent/.local/share/uv/python/cpython-3.13.0-linux-x86_64-gnu/include/python3.13 -c src/ext/_inflate64module.c -o build/temp.linux-x86_64-cpython-313/src/ext/_inflate64module.o
|
| [stderr]
| /var/lib/buildkite-agent/.cache/uv/builds-v0/.tmpJ7jWso/lib/python3.13/site-packages/setuptools_scm/git.py:310: UserWarning: git archive did not support describe output
| warnings.warn("git archive did not support describe output")
| /var/lib/buildkite-agent/.cache/uv/builds-v0/.tmpJ7jWso/lib/python3.13/site-packages/setuptools_scm/git.py:328: UserWarning: unprocessed git archival found (no export subst applied)
| warnings.warn("unprocessed git archival found (no export subst applied)")
| /var/lib/buildkite-agent/.cache/uv/builds-v0/.tmpJ7jWso/lib/python3.13/site-packages/setuptools/config/_apply_pyprojecttoml.py:82: SetuptoolsDeprecationWarning: `project.license` as a TOML table is deprecated
| !!
|
| ********************************************************************************
| Please use a simple string containing a SPDX expression for `project.license`. You can also use `project.license-files`. (Both options available on setuptools>=77.0.0).
|
| By 2026-Feb-18, you need to update your project and remove deprecated calls
| or your builds will no longer be supported.
|
| See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
| ********************************************************************************
|
| !!
| corresp(dist, value, root_dir)
| /var/lib/buildkite-agent/.cache/uv/builds-v0/.tmpJ7jWso/lib/python3.13/site-packages/setuptools/config/_apply_pyprojecttoml.py:61: SetuptoolsDeprecationWarning: License classifiers are deprecated.
| !!
|
| ********************************************************************************
| Please consider removing the following classifiers in favor of a SPDX license expression:
|
| License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)
|
| See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
| ********************************************************************************
|
| !!
| dist._finalize_license_expression()
| /var/lib/buildkite-agent/.cache/uv/builds-v0/.tmpJ7jWso/lib/python3.13/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
| !!
|
| ********************************************************************************
| Please consider removing the following classifiers in favor of a SPDX license expression:
|
| License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)
|
| See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
| ********************************************************************************
|
| !!
| self._finalize_license_expression()
| ERROR setuptools_scm._file_finders.git listing git files failed - pretending there aren't any
| warning: no previously-included files found matching '.gitignore'
| warning: no previously-included files found matching '.woodpecker.yml'
| no previously-included directories found matching 'ci'
| no previously-included directories found matching 'ISSUE_TEMPLATE'
| error: command 'clang' failed: No such file or directory
| make: *** [../../default.mk:39: .venv-default] Error 2
| 🚨 Error: The command exited with status 2
| user command error: exit status 2
@lucasrodes
Yes I use Python 3.13, test on windows and in a Docker container
From what I see in your log : error: command 'clang' failed: No such file or directory
The package inflate64 does not have python 3.13 wheels for now, so uv/pip try to build it from sources. Do you have build tools installed ? (like build-essentials on debian by example)
Mmmmh. I think I didn't.
I just ran sudo dnf install clang, and now uv sync doesn't seem to complain about this error.
I need to figure out why the servers running the CI/CD tests don't have that out of the box (ubuntu).
This and #650 seem to be fixed because ppmd 1.2.0 has wheels for Python 3.13. So does inflate64 1.0.3. And py7zr 1.0.0 is now pinned to:
"pyppmd>=1.1.0,<1.3.0",
"inflate64>=1.0.0,<1.1.0",
Trying to install it in a manylinux container with Python 3.13 works fine and only uses wheels:
> python3.13 -m pip install py7zr
Collecting py7zr
Downloading py7zr-1.0.0-py3-none-any.whl.metadata (17 kB)
Collecting texttable (from py7zr)
Downloading texttable-1.7.0-py2.py3-none-any.whl.metadata (9.8 kB)
Collecting pycryptodomex>=3.20.0 (from py7zr)
Downloading pycryptodomex-3.23.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.4 kB)
Collecting brotli>=1.1.0 (from py7zr)
Downloading Brotli-1.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (5.5 kB)
Collecting psutil (from py7zr)
Downloading psutil-7.0.0-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (22 kB)
Collecting pyzstd>=0.16.1 (from py7zr)
Downloading pyzstd-0.17.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.5 kB)
Collecting pyppmd<1.3.0,>=1.1.0 (from py7zr)
Downloading pyppmd-1.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (5.4 kB)
Collecting pybcj<1.1.0,>=1.0.0 (from py7zr)
Downloading pybcj-1.0.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.7 kB)
Collecting multivolumefile>=0.2.3 (from py7zr)
Downloading multivolumefile-0.2.3-py3-none-any.whl.metadata (6.3 kB)
Collecting inflate64<1.1.0,>=1.0.0 (from py7zr)
Downloading inflate64-1.0.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.4 kB)
Downloading py7zr-1.0.0-py3-none-any.whl (69 kB)
Downloading inflate64-1.0.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (97 kB)
Downloading pybcj-1.0.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (51 kB)
Downloading pyppmd-1.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (142 kB)
Downloading Brotli-1.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.9 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.9/2.9 MB 40.7 MB/s eta 0:00:00
Downloading multivolumefile-0.2.3-py3-none-any.whl (17 kB)
Downloading pycryptodomex-3.23.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.3/2.3 MB 61.0 MB/s eta 0:00:00
Downloading pyzstd-0.17.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (415 kB)
Downloading psutil-7.0.0-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (277 kB)
Downloading texttable-1.7.0-py2.py3-none-any.whl (10 kB)
Installing collected packages: texttable, brotli, pyzstd, pyppmd, pycryptodomex, pybcj, psutil, multivolumefile, inflate64, py7zr
Successfully installed brotli-1.1.0 inflate64-1.0.3 multivolumefile-0.2.3 psutil-7.0.0 py7zr-1.0.0 pybcj-1.0.6 pycryptodomex-3.23.0 pyppmd-1.2.0 pyzstd-0.17.0 texttable-1.7.0
Which dependency is broker?
This has been fixed since v1.0.0 so i'm closing this.