Open wthrajat opened 5 months ago
@wthrajat, this is weird because I recently tested the installation on Ubuntu24.04, see this #94, with Python3.12
with no errors regarding pkgutil.ImpImporter
, could you please describe how I can I reproduce it?
@MuhammadMuradG Are you sure? Because even in the official notice here: https://docs.python.org/3/library/pkgutil.html You can clearly see on the above link that the class has been depreciated.
@MuhammadMuradG Moreover, that has also been faced by other developers in the chat.
@MuhammadMuradG Are you sure? Because even in the official notice here: https://docs.python.org/3/library/pkgutil.html
Actually, the screen record in #94 PR is from clean install of Ubuntu24.04 VM with Python3.12
.
The question is which of our imported libraries using pkgutil.find_loader
, actually all libraries we are using support Python3.12
. Also, could you please copy and paste the whole log, so, we can see which module raising this error.
I guess you have some conflicts with python global venv
and local venv
. In #94 PR we are fixed version of imported libraries. Please, try running this #94 PR with venv
and make sure you deleted the previously installed libraries globally or locally.
Here is the complete log:
pip install -r requirements.txt ─╯
Collecting argon2-cffi==23.1.0 (from -r requirements.txt (line 1))
Using cached argon2_cffi-23.1.0-py3-none-any.whl.metadata (5.2 kB)
Collecting argon2-cffi-bindings==21.2.0 (from -r requirements.txt (line 2))
Using cached argon2_cffi_bindings-21.2.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.7 kB)
Collecting cffi==1.16.0 (from -r requirements.txt (line 3))
Using cached cffi-1.16.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (1.5 kB)
Collecting numpy==1.25.0 (from -r requirements.txt (line 4))
Using cached numpy-1.25.0.tar.gz (10.4 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [33 lines of output]
Traceback (most recent call last):
File "/home/rajat/rust/t3/great-wall/3venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/home/rajat/rust/t3/great-wall/3venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rajat/rust/t3/great-wall/3venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 112, in get_requires_for_build_wheel
backend = _build_backend()
^^^^^^^^^^^^^^^^
File "/home/rajat/rust/t3/great-wall/3venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 77, in _build_backend
obj = import_module(mod_path)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1310, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 995, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "/tmp/pip-build-env-4rpi_6vj/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 16, in <module>
import setuptools.version
File "/tmp/pip-build-env-4rpi_6vj/overlay/lib/python3.12/site-packages/setuptools/version.py", line 1, in <module>
import pkg_resources
File "/tmp/pip-build-env-4rpi_6vj/overlay/lib/python3.12/site-packages/pkg_resources/__init__.py", line 2172, in <module>
register_finder(pkgutil.ImpImporter, find_on_path)
^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
If you check this StackOverflow post, there is also mentioned that this is specific to Python3.12
https://stackoverflow.com/questions/77364550/attributeerror-module-pkgutil-has-no-attribute-impimporter-did-you-mean
I guess you have some conflicts with python global venv and local venv.
No I have tried this with clean installation as well. And deleting local and global venv as well. I don't think that's the problem since some devs also faced this issue in the chats.
Do you mind posting your logs here? Like show commands which tells which Python version are you using in your venv
and then show the output of pip install -r requirements.txt
Thanks.
Please, try running this https://github.com/Yuri-SVB/Great_Wall/pull/94 PR with venv and make sure you deleted the previously installed libraries globally or locally.
I see there is some dependency version upgradation in this PR. I don't think we should mix 2 issues up here. If there is a dependency error in Python3.12, we should address it. And not wait rely on some other PR where there is version change. As anyone using it will be using the GreatWall before #94 is merged.
@MuhammadMuradG Found the bug. It was numpy's version upgrade that solved the issue. And your PR #94 had that upgraded to v1.26.0 hence you didn't encounter any problem. That said, it really was an issue which is now fixed with newer version of numpy. Here are the logs when I upgraded the numpy version:
pip install -r requirements.txt ─╯
Collecting argon2-cffi==23.1.0 (from -r requirements.txt (line 1))
Using cached argon2_cffi-23.1.0-py3-none-any.whl.metadata (5.2 kB)
Collecting argon2-cffi-bindings==21.2.0 (from -r requirements.txt (line 2))
Using cached argon2_cffi_bindings-21.2.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.7 kB)
Collecting cffi==1.16.0 (from -r requirements.txt (line 3))
Using cached cffi-1.16.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (1.5 kB)
Collecting numpy==1.26.0 (from -r requirements.txt (line 4))
Downloading numpy-1.26.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (58 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.5/58.5 kB 1.2 MB/s eta 0:00:00
Collecting Pillow==10.1.0 (from -r requirements.txt (line 5))
Downloading Pillow-10.1.0-cp312-cp312-manylinux_2_28_x86_64.whl.metadata (9.5 kB)
Collecting pycparser==2.21 (from -r requirements.txt (line 6))
Downloading pycparser-2.21-py2.py3-none-any.whl.metadata (1.1 kB)
Collecting PyQt5==5.15.10 (from -r requirements.txt (line 7))
Downloading PyQt5-5.15.10-cp37-abi3-manylinux_2_17_x86_64.whl.metadata (2.1 kB)
Collecting PyQt5-Qt5==5.15.2 (from -r requirements.txt (line 8))
Downloading PyQt5_Qt5-5.15.2-py3-none-manylinux2014_x86_64.whl.metadata (535 bytes)
Collecting PyQt5-sip==12.13.0 (from -r requirements.txt (line 9))
Downloading PyQt5_sip-12.13.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.whl.metadata (504 bytes)
Downloading argon2_cffi-23.1.0-py3-none-any.whl (15 kB)
Downloading argon2_cffi_bindings-21.2.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (86 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 86.2/86.2 kB 4.8 MB/s eta 0:00:00
Downloading cffi-1.16.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (477 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 477.6/477.6 kB 3.9 MB/s eta 0:00:00
Downloading numpy-1.26.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.9 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.9/17.9 MB 5.9 MB/s eta 0:00:00
Downloading Pillow-10.1.0-cp312-cp312-manylinux_2_28_x86_64.whl (3.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.6/3.6 MB 5.9 MB/s eta 0:00:00
Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 118.7/118.7 kB 5.5 MB/s eta 0:00:00
Downloading PyQt5-5.15.10-cp37-abi3-manylinux_2_17_x86_64.whl (8.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.2/8.2 MB 6.0 MB/s eta 0:00:00
Downloading PyQt5_Qt5-5.15.2-py3-none-manylinux2014_x86_64.whl (59.9 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 59.9/59.9 MB 5.2 MB/s eta 0:00:00
Downloading PyQt5_sip-12.13.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.whl (360 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 361.0/361.0 kB 6.5 MB/s eta 0:00:00
Installing collected packages: PyQt5-Qt5, PyQt5-sip, pycparser, Pillow, numpy, PyQt5, cffi, argon2-cffi-bindings, argon2-cffi
Successfully installed Pillow-10.1.0 PyQt5-5.15.10 PyQt5-Qt5-5.15.2 PyQt5-sip-12.13.0 argon2-cffi-23.1.0 argon2-cffi-bindings-21.2.0 cffi-1.16.0 numpy-1.26.0 pycparser-2.21
You can check here: https://numpy.org/doc/stable/release.html
@MuhammadMuradG Now I have updated the PR to have the newer version of Numpy, till #94 is merged. This should fix the error. Thanks.
@wthrajat, so, as you can see from the log of the broken requirements installation:
Collecting numpy==1.25.0 (from -r requirements.txt (line 4))
Using cached numpy-1.25.0.tar.gz (10.4 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
│ ...
The issue is arising when you try to install numpy
with version=1.25.0
and then it isn't related to the python version, so, then the first question you can ask yourself is that is numpy
support python3.12
? Now, with a quick search, with just 3mins, you can find that numpy==1.26.0
support python3.12
not numpy==1.25.0
and continue with that is how you can debugging this bug.
Do you mind posting your logs here? Like show commands which tells which Python version are you using in your venv and then show the output of
pip install -r requirements.txt
.
As I mentioned and directed you before, I used Ubuntu24.04
with python3.12
and you can find in #94 PR all info about packages versions I used. Also, there is no point here of posting a successful installation log, but posting a failure installation log provides the experience developers with insight on the problem of failure installation and how other developers can solve their issues of installation.
I see there is some dependency version upgrading in this PR. I don't think we should mix 2 issues up here.
Yes, you are right, but because this PR includes install new package, and major changes in the project structure with additional updates and features relating to the docs and implementation, I decided to include this fix; i.e.
- numpy==1.25.0
+ numpy==1.26.0
with others minor not direct related to #94 PR, like fix the contribution guide links, but feel free to open new ones to solve each of them independently if you want.
However, I'm glad you found the solution.
@MuhammadMuradG, you are requested to approve changes by @wthrajat.
@Yuri-SVB, this is good for me.
Changes
Changes the instructions to use
Python3.10
.What does the PR solve?
Currently our dependency depends on
pkgutil.ImpImporter
, which is depreciated inPython3.12
.So due to the removal of the long-deprecated
pkgutil.ImpImporter
class, the dependencies installation process will result in an error. So it is recommended to NOT use python3.12.And other minor formatting fix.
Demo needed?
No visual changes as such.
PR Checklist: