Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 6015

No module named 'distutils.util' ...but distutils installed? [duplicate]

$
0
0

I was wanting to upgrade my python version (to 3.10 in this case) so after installing python3.10 I proceeded to try adding some modules I use e.g. opencv , which ran into:

jeremy@jeremy-Blade:~$ python3.10 -m pip install opencv-python Traceback (most recent call last):  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main    return _run_code(code, main_globals, None,  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code    exec(code, run_globals)  File "/usr/lib/python3/dist-packages/pip/__main__.py", line 16, in <module>    from pip._internal.cli.main import main as _main  # isort:skip # noqa  File "/usr/lib/python3/dist-packages/pip/_internal/cli/main.py", line 10, in <module>    from pip._internal.cli.autocompletion import autocomplete  File "/usr/lib/python3/dist-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>    from pip._internal.cli.main_parser import create_main_parser  File "/usr/lib/python3/dist-packages/pip/_internal/cli/main_parser.py", line 7, in <module>    from pip._internal.cli import cmdoptions  File "/usr/lib/python3/dist-packages/pip/_internal/cli/cmdoptions.py", line 19, in <module>    from distutils.util import strtoboolModuleNotFoundError: No module named 'distutils.util'jeremy@jeremy-Blade:~$ sudo apt-get install python3-distutils[sudo] password for jeremy: Reading package lists... DoneBuilding dependency tree       Reading state information... Donepython3-distutils is already the newest version (3.8.10-0ubuntu1~20.04)....0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.

Since distutils already seems to be installed , I can't grok how to proceed. Note that this question is distinct from the one here since for this case distutils is already installed and, as shown above, '''sudo apt-get install python3-distutils''' does not avail in this situation. Furthermore, the setuptools information in the answers here is useful and not reproduced there.


Viewing all articles
Browse latest Browse all 6015

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>