question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Request bump in py7zr dependency version to allow 0.11

See original GitHub issue

I write open source applications for researchers and your tools are very helpful. ありがとうございます

I’m trying to use the Install Qt GitHub Action with the ubuntu-16.04 runner which only has Python 3.5. You fixed py7zr compatibility with Python<3.8 in version 0.11 (this commit: https://github.com/miurahr/py7zr/commit/db895a91f3fe5ef22203bccbfb72dfa7d2f64a21). Unfortunately, even if I specify with: py7zrversion: '>=0.11', the aqtinstall requirements takes over because it explicitly demands py7zr <0.11. https://github.com/miurahr/aqtinstall/blob/master/setup.cfg#L38

You updated this dependency recently, but is it possible to please update it again to <=0.11?

GitHub Actions log
python3 -m pip install py7zr>=0.11
Collecting py7zr>=0.11
  Downloading https://files.pythonhosted.org/packages/71/7e/236ed34f6a1ed4719dfaa1a5adfe36474f5f654e68e343c0711e1e286448/py7zr-0.11.0-py3-none-any.whl (63kB)
Collecting importlib-metadata; python_version < "3.8" (from py7zr>=0.11)
  Downloading https://files.pythonhosted.org/packages/4a/c3/78826cdf0f7bf2d307aa4c6922aac9bd53c5d4f0de64e7db52771e641c8f/importlib_metadata-3.1.0-py2.py3-none-any.whl
Collecting texttable (from py7zr>=0.11)
  Downloading https://files.pythonhosted.org/packages/06/f5/46201c428aebe0eecfa83df66bf3e6caa29659dbac5a56ddfd83cae0d4a4/texttable-1.6.3-py2.py3-none-any.whl
Collecting pycryptodome (from py7zr>=0.11)
  Downloading https://files.pythonhosted.org/packages/49/e0/d70332ec5c1b5b82d27468cf97a87da7c85b7e60edc9a9afd36648a29290/pycryptodome-3.9.9-cp35-cp35m-manylinux1_x86_64.whl (13.7MB)
Collecting zipp>=0.5 (from importlib-metadata; python_version < "3.8"->py7zr>=0.11)
  Downloading https://files.pythonhosted.org/packages/41/ad/6a4f1a124b325618a7fb758b885b68ff7b058eec47d9220a12ab38d90b1f/zipp-3.4.0-py3-none-any.whl
Installing collected packages: zipp, importlib-metadata, texttable, pycryptodome, py7zr
Successfully installed importlib-metadata-3.1.0 py7zr-0.11.0 pycryptodome-3.9.9 texttable-1.6.3 zipp-3.4.0
You are using pip version 8.1.1, however version 20.2.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
python3 -m pip install aqtinstall>=0.9.8
Collecting aqtinstall>=0.9.8
  Downloading https://files.pythonhosted.org/packages/ea/8a/4704e190855711a405eacee695ef32967d9961d885d7c1a0ffa5c359c605/aqtinstall-0.9.8-py2.py3-none-any.whl
Collecting wheel (from aqtinstall>=0.9.8)
  Using cached https://files.pythonhosted.org/packages/a7/00/3df031b3ecd5444d572141321537080b40c1c25e1caa3d86cdd12e5e919c/wheel-0.35.1-py2.py3-none-any.whl
Collecting importlib-metadata; python_version < "3.8" (from aqtinstall>=0.9.8)
  Using cached https://files.pythonhosted.org/packages/4a/c3/78826cdf0f7bf2d307aa4c6922aac9bd53c5d4f0de64e7db52771e641c8f/importlib_metadata-3.1.0-py2.py3-none-any.whl
Collecting texttable (from aqtinstall>=0.9.8)
  Using cached https://files.pythonhosted.org/packages/06/f5/46201c428aebe0eecfa83df66bf3e6caa29659dbac5a56ddfd83cae0d4a4/texttable-1.6.3-py2.py3-none-any.whl
Collecting py7zr!=0.10.0,<0.11.0,>=0.9.9 (from aqtinstall>=0.9.8)
  Downloading https://files.pythonhosted.org/packages/df/ca/88df33e3d7d7afec48a8345f4bea12426661ea5fff5c0c5eea20da6d8dc2/py7zr-0.10.1-py3-none-any.whl (62kB)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
cboulaycommented, Nov 25, 2020

You’re right! I’m so sorry for the confusion. It appears to be a problem with importlib_metadata. See https://github.com/python/importlib_metadata/issues/259 for example.

Hopefully they fix it soon. In the meantime, it is possible to pip3 install importlib-metadata==2.1.0. I’ll see if I can get the runner to do that before installing Qt. Edit: Unfortunately installing importlib-metadata first didn’t seem to fix the problem. I will wait for an upstream fix.

For reference, here is the Actions page: https://github.com/labstreaminglayer/App-LabRecorder/runs/1451188135?check_suite_focus=true The most recent error run shows the problem I’m talking about.

The error is collapsed below.

ubuntu-16.04 error
python3 -m aqt install 5.12.9 linux desktop -O /home/runner/work/App-LabRecorder/Qt
Traceback (most recent call last):
  File "/home/runner/.local/lib/python3.5/site-packages/py7zr/__init__.py", line 21, in <module>
    from importlib.metadata import PackageNotFoundError, version  # type: ignore
ImportError: No module named 'importlib.metadata'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 174, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.5/runpy.py", line 133, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/usr/lib/python3.5/runpy.py", line 109, in _get_module_details
    __import__(pkg_name)
  File "/home/runner/.local/lib/python3.5/site-packages/aqt/__init__.py", line 25, in <module>
    from aqt.cli import Cli
  File "/home/runner/.local/lib/python3.5/site-packages/aqt/cli.py", line 36, in <module>
    from aqt.installer import QtInstaller
  File "/home/runner/.local/lib/python3.5/site-packages/aqt/installer.py", line 32, in <module>
    import py7zr
  File "/home/runner/.local/lib/python3.5/site-packages/py7zr/__init__.py", line 23, in <module>
    from importlib_metadata import PackageNotFoundError, version  # type: ignore
  File "/home/runner/.local/lib/python3.5/site-packages/importlib_metadata/__init__.py", line 43, in <module>
    class PackageNotFoundError(ModuleNotFoundError):
NameError: name 'ModuleNotFoundError' is not defined
Error: The process 'python3' failed with exit code 1
0reactions
cboulaycommented, Nov 30, 2020

Dear Miura-san, I would like to update with you with what I believe is the correct identity of the problem.

The GitHub Actions Ubuntu 16.04 runner comes with pip version 8 which does not respect the python_requires flag. Thus the install-qt-actions script was downloading and installing the latest versions of these packages even though you have correctly marked them as incompatible with python 3.5. For anyone who finds this issue in the future, you can find my workaround for that particular problem here.

Best regards.

Read more comments on GitHub >

github_iconTop Results From Across the Web

importlib_metadata 3.x no longer runs on Python older than 3.6.
@cboulay cboulay mentioned this issue on Nov 24, 2020. Request bump in py7zr dependency version to allow 0.11 miurahr/aqtinstall#183.
Read more >
py7zr - PyPI
py7zr is a library and utility to support 7zip archive compression, decompression, encryption and decryption written by Python programming language.
Read more >
User Guide — py7zr – 7-zip archive library - Read the Docs
User Guide¶. The 7z file format is a popular archive and compression format in recent days. This module provides tools to read, write...
Read more >
poetry.lock - Hugging Face
bump versions of depenencies ... [package.dependencies] ... "The hassle-free way to integrate analytics into any python application.".
Read more >
Software Packages in "jammy", Subsection python - Ubuntu
... s390x]) [security]: Minimal subset of the Python language (version 3.10) ... python3-applicationinsights (0.11.10-1) [universe]: Azure Application ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found