Comments (11)
When aqt try import py7zr
and failed, aqt fall back to use external command, which default is '7z'..
It is implemented in installer.py
module.
Lines 69 to 74 in 8cbe51b
here is a space we can leave a log message.
from aqtinstall.
Note: here is the install log for aqt on the azure VM:
Notice: A new release of pip available: 22.3.1 -> 23.2.1
Notice: To update, run: python.exe -m pip install --upgrade pip
Collecting aqtinstall
Using cached aqtinstall-3.1.6-py3-none-any.whl (59 kB)
Collecting bs4
Using cached bs4-0.0.1.tar.gz (1.1 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting defusedxml
Using cached defusedxml-0.7.1-py2.py3-none-any.whl (25 kB)
Collecting humanize
Using cached humanize-4.7.0-py3-none-any.whl (113 kB)
Collecting patch>=1.16
Using cached patch-1.16.zip (12 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting py7zr>=0.20.2
Using cached py7zr-0.20.5-py3-none-any.whl (66 kB)
Collecting requests>2.20.0
Using cached requests-2.31.0-py3-none-any.whl (62 kB)
Collecting semantic-version
Using cached semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)
Collecting texttable
Using cached texttable-1.6.7-py2.py3-none-any.whl (10 kB)
Collecting pycryptodomex>=3.6.6
Using cached pycryptodomex-3.18.0-cp35-abi3-win_amd64.whl (1.7 MB)
Collecting pyzstd>=0.14.4
Using cached pyzstd-0.15.9-cp311-cp311-win_amd64.whl (245 kB)
Collecting pyppmd<1.1.0,>=0.18.1
Using cached pyppmd-1.0.0-cp311-cp311-win_amd64.whl (46 kB)
Collecting pybcj>=0.6.0
Using cached pybcj-1.0.1-cp311-cp311-win_amd64.whl (24 kB)
Collecting multivolumefile>=0.2.3
Using cached multivolumefile-0.2.3-py3-none-any.whl (17 kB)
Collecting brotli>=1.0.9
Using cached Brotli-1.0.9-cp311-cp311-win_amd64.whl (333 kB)
Collecting inflate64>=0.3.1
Using cached inflate64-0.3.1-cp311-cp311-win_amd64.whl (35 kB)
Collecting psutil
Using cached psutil-5.9.5-cp36-abi3-win_amd64.whl (255 kB)
Collecting charset-normalizer<4,>=2
Using cached charset_normalizer-3.2.0-cp311-cp311-win_amd64.whl (96 kB)
Collecting idna<4,>=2.5
Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting urllib3<3,>=1.21.1
Using cached urllib3-2.0.4-py3-none-any.whl (123 kB)
Collecting certifi>=2017.4.17
Using cached certifi-2023.7.22-py3-none-any.whl (158 kB)
Collecting beautifulsoup4
Using cached beautifulsoup4-4.12.2-py3-none-any.whl (142kB)
Collecting soupsieve>1.2
Using cached soupsieve-2.4.1-py3-none-any.whl (36 kB)
Installing collected packages: texttable, patch, brotli, urllib3, soupsieve, semantic-version, pyzstd, pyppmd, pycryptodomex, pybcj, psutil, multivolumefile, inflate64, idna, humanize, defusedxml, charset-normalizer, certifi, requests, py7zr, beautifulsoup4, bs4, aqtinstall
DEPRECATION: patch is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
Running setup.py install for patch: started
Running setup.py install for patch: finished with status 'done'
DEPRECATION: bs4 is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
Running setup.py install for bs4: started
Running setup.py install for bs4: finished with status 'done'
Successfully installed aqtinstall-3.1.6 beautifulsoup4-4.12.2 brotli-1.0.9 bs4-0.0.1 certifi-2023.7.22 charset-normalizer-3.2.0 defusedxml-0.7.1 humanize-4.7.0 idna-3.4 inflate64-0.3.1 multivolumefile-0.2.3 patch-1.16 psutil-5.9.5 py7zr-0.20.5 pybcj-1.0.1 pycryptodomex-3.18.0 pyppmd-1.0.0 pyzstd-0.15.9 requests-2.31.0 semantic-version-2.10.0 soupsieve-2.4.1 texttable-1.6.7 urllib3-2.0.4
from aqtinstall.
Can you please show us the whole command you are using to install QT?
This error message only happens when you are using 7z
to extract archives, instead of the internal py7zr tool. See the docs on the -E/--external
flag: https://aqtinstall.readthedocs.io/en/latest/getting_started.html#external-7-zip-extractor
Simple fix: install 7z in your CI instance. Otherwise you can remove the -E
flag.
from aqtinstall.
The command used to install qt is specified at the end of the issue text, and is the whole command. This same command is used successfully on the laptop, and 7zip is not installed on it either so I doubt we are accidentally using the external flag.
I'd also rather not have to install 7z manually on our CI instance if we can avoid it, but will keep the suggestion in mind.
from aqtinstall.
Hello, and thanks for your reply. This was enlightening, and i searched why the module would fail to load.
It lead me to this error:
Traceback (most recent call last):
File "C:\ghr\IOTSEC-gh-actions\1\_work\setup-qt\setup-qt\.venv\Lib\site-packages\py7zr\compressor.py", line 67, in <module>
import brotli # type: ignore # noqa
^^^^^^^^^^^^^
File "C:\ghr\IOTSEC-gh-actions\1\_work\setup-qt\setup-qt\.venv\Lib\site-packages\brotli.py", line 8, in <module>
import _brotli
ImportError: DLL load failed while importing _brotli: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<frozen runpy>", line [189](https://github.schneider-electric.com/IOTSEC-gh-actions/setup-qt/actions/runs/453591/jobs/1078419#step:4:193), in _run_module_as_main
File "<frozen runpy>", line 148, in _get_module_details
File "<frozen runpy>", line 112, in _get_module_details
File "C:\ghr\IOTSEC-gh-actions\1\_work\setup-qt\setup-qt\.venv\Lib\site-packages\py7zr\__init__.py", line 45, in <module>
from py7zr.py7zr import ArchiveInfo, FileInfo, SevenZipFile, is_7zfile, pack_7zarchive, unpack_7zarchive
File "C:\ghr\IOTSEC-gh-actions\1\_work\setup-qt\setup-qt\.venv\Lib\site-packages\py7zr\py7zr.py", line 43, in <module>
from py7zr.archiveinfo import Folder, Header, SignatureHeader
File "C:\ghr\IOTSEC-gh-actions\1\_work\setup-qt\setup-qt\.venv\Lib\site-packages\py7zr\archiveinfo.py", line 36, in <module>
from py7zr.compressor import SevenZipCompressor, SevenZipDecompressor
File "C:\ghr\IOTSEC-gh-actions\1\_work\setup-qt\setup-qt\.venv\Lib\site-packages\py7zr\compressor.py", line 69, in <module>
import brotlicffi as brotli # type: ignore # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'brotlicffi'
In my CI script, I installed brotlicffi manually, which did the trick and aqt works properly on the Azure VM now. I opened a new issue on py7zr to be looked at.
I'm unsure where this should be fixed, so i'll leave this issue open for now, but feel free to close it as needed, and once again thanks for your quick reply !
from aqtinstall.
Is there a valid reason to use 7z format instead of more classical format handled by python's shutil for instance zip?
from aqtinstall.
Is there a valid reason to use 7z format instead of more classical format handled by python's shutil for instance zip?
Yes, there is. The Qt organization packages these files as 7z. We don’t get a choice in the matter.
Different compression algorithms have different compression ratios for different types of files. My guess is that the Qt developers chose 7z because it works well for the binaries they’re trying to compress. IIRC the ‘zip’ file format often doesn’t perform as well as many of the other formats; I can’t confirm this though.
from aqtinstall.
here is a space we can leave a log message.
That’s a really good idea; it would help a lot in cases like this. What log level do you think it should be? I’m leaning towards ‘warning’.
from aqtinstall.
here is a space we can leave a log message.
That’s a really good idea; it would help a lot in cases like this. What log level do you think it should be? I’m leaning towards ‘warning’.
I prefer "warning" here.
from aqtinstall.
Because #705 is merged and released. Can I close here? @yannou38
from aqtinstall.
Yes, this issue can be closed
from aqtinstall.
Related Issues (20)
- Failed to install or list Qt IFW HOT 2
- Error when use qmake with Qt 6 HOT 15
- Support python 3.11 & 3.9 HOT 8
- No RCC command on linux with Qt 6.5.2 HOT 4
- debug_info missing HOT 2
- Allow for installation of preview (beta/alpha) releases HOT 7
- Add macOS pre-build to releases HOT 2
- 'pip install --target <directory> aqtinstall' failing with Python 3.12 on GitHub runners HOT 4
- list_* commands ignore base url setting HOT 1
- Configuration file ignored HOT 2
- QT plugin update breaks installation HOT 3
- QtInsight module missing HOT 4
- Topic: deprecate offline parameter validation and "combinations.json"
- Feature: support "dry run" mode
- Issue with linux_arm64 builds HOT 9
- Some documentation archives not found by list-doc HOT 6
- howto list installed modules and where modules are installed HOT 1
- feature request: ability to pass custom options to 7zip
- Failed to locate XML data for the tool 'tools_openssl_x64' HOT 2
- Bundled zlib option?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aqtinstall.