-
Notifications
You must be signed in to change notification settings - Fork 379
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
[Python 3.12] ModuleNotFoundError: No module named 'setuptools'
as setuptools
not in the venv
, only installed by apt
!
#4278
Comments
First off, which operating system and environment is the problematic? It would be crucial to know what falls apart. |
Sorry, i thought linking the actual log would be sufficient to answer any such question. |
Okay, I was able to reproduce it. Unfortunately, root@7684ab69eef9:/CodeChecker# which python3
/usr/bin/python3
root@7684ab69eef9:/CodeChecker# python3 -V
Python 3.12.4
root@7684ab69eef9:/CodeChecker# python3 -c "import setuptools"; echo $?
0
root@7684ab69eef9:/CodeChecker# source venv/bin/activate
(CodeChecker venv) root@7684ab69eef9:/CodeChecker# which python3
/CodeChecker/venv/bin/python3
(CodeChecker venv) root@7684ab69eef9:/CodeChecker# python3 -V
Python 3.12.4
(CodeChecker venv) root@7684ab69eef9:/CodeChecker# python3 -c "import setuptools"; echo $?
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'setuptools'
1 As a workaround, doing (CodeChecker venv) root@7684ab69eef9:/CodeChecker# pip install setuptools
Collecting setuptools
Using cached setuptools-70.2.0-py3-none-any.whl.metadata (5.8 kB)
Using cached setuptools-70.2.0-py3-none-any.whl (930 kB)
Installing collected packages: setuptools
Successfully installed setuptools-70.2.0
(CodeChecker venv) root@7684ab69eef9:/CodeChecker# python3 -c "import setuptools"; echo $?
0 It seems like once we reach the point that we can be sure to support such new Python versions, we will have to update the documentation. N.B. this is a global Python-level issue or behavioural quirk, as it can be reproduced with packages other than CodeChecker's structure: root@7684ab69eef9:/# python3 -c "import tabulate"; echo $?
[...]
ModuleNotFoundError: No module named 'tabulate'
1
root@7684ab69eef9:/# apt -yqq install python3-tabulate
[...]
root@7684ab69eef9:/# python3 -c "import tabulate"; echo $?
0
root@7684ab69eef9:/# python3 -m venv my_test_venv
root@7684ab69eef9:/# source my_test_venv/bin/activate
(my_test_venv) root@7684ab69eef9:/# python3 -c "import tabulate"; echo $?
[...]
ModuleNotFoundError: No module named 'tabulate'
1 |
make package
fails: ModuleNotFoundError: No module named 'setuptools'
ModuleNotFoundError: No module named 'setuptools'
as setuptools
not in the venv
, only installed by apt
!
@whisperity thank you for taking a look! |
Some more information and potential "venv-level" or "global" workarounds available here: Oddly enough, |
Some platforms don't come with pre-installed setuptools module. However, some CodeChecker modules need this library as a dependency. Fixes Ericsson#4278
Some platforms don't come with pre-installed setuptools module. However, some CodeChecker modules need this library as a dependency. Fixes Ericsson#4278
Some platforms don't come with pre-installed setuptools module. However, some CodeChecker modules need this library as a dependency. Fixes Ericsson#4278
Failing CI job: https://github.com/darktable-org/rawspeed/actions/runs/9698273466/job/26764443826
python3-setuptools
package is installed: https://github.com/darktable-org/rawspeed/actions/runs/9698273466/job/26764443826#step:5:765make venv
does not seem to remove it:https://github.com/darktable-org/rawspeed/actions/runs/9698273466/job/26764443826#step:10:17
Yet
make package
ultimately fails:https://github.com/darktable-org/rawspeed/actions/runs/9698273466/job/26764443826#step:10:250
Google suggests that
setuptools
should not be inrequirements.txt
and certainly should not be in a lock file.I'm a little bit lost as to what is going on.
X-Ref: darktable-org/rawspeed#738 (comment)
The text was updated successfully, but these errors were encountered: