2

I have a upgraded to Python 3.10 on my Ubuntu (checked by print(sys.version)). But when I try pip list I got ModuleNotFoundError: No module named 'distutils.cmd'.

I followed this advice: Pip is not working for Python 3.10 on Ubuntu and I tried curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10

but I got:

Traceback (most recent call last):
  File "<stdin>", line 33324, in <module>
  File "<stdin>", line 135, in main
  File "<stdin>", line 111, in bootstrap
  File "<stdin>", line 92, in monkeypatch_for_cert
  File "/tmp/tmpr6q_je03/pip.zip/pip/_internal/commands/__init__.py", line 9, in <module>
  File "/tmp/tmpr6q_je03/pip.zip/pip/_internal/cli/base_command.py", line 15, in <module>
  File "/tmp/tmpr6q_je03/pip.zip/pip/_internal/cli/cmdoptions.py", line 23, in <module>
  File "/tmp/tmpr6q_je03/pip.zip/pip/_internal/cli/parser.py", line 12, in <module>
  File "/tmp/tmpr6q_je03/pip.zip/pip/_internal/configuration.py", line 26, in <module>
  File "/tmp/tmpr6q_je03/pip.zip/pip/_internal/utils/logging.py", line 27, in <module>
  File "/tmp/tmpr6q_je03/pip.zip/pip/_internal/utils/misc.py", line 39, in <module>
  File "/tmp/tmpr6q_je03/pip.zip/pip/_internal/locations/__init__.py", line 14, in <module>
  File "/tmp/tmpr6q_je03/pip.zip/pip/_internal/locations/_distutils.py", line 9, in <module>
ModuleNotFoundError: No module named 'distutils.cmd'

When I tried curl https://bootstrap.pypa.io/get-pip.py | Sudo python3

I got

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
Command 'Sudo' not found, did you mean:

  command 'ludo' from snap ludo (0.16.13)
  command 'udo' from deb udo (6.4.1-5)
  command 'sudo' from deb sudo (1.8.31-1ubuntu1.2)
  command 'sudo' from deb sudo-ldap (1.8.31-1ubuntu1.2)

See 'snap info <snapname>' for additional versions.

  0 2596k    0  4113    0     0  44043      0  0:01:00 --:--:--  0:01:00 44225
curl: (23) Failure writing output to destination

What is the problem here, please?

vojtam
  • 1,157
  • 9
  • 34

0 Answers0