Quantcast
Channel: Active questions tagged windows-subsystem-for-linux - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2797

Python 3.8 + Pip on WSL

$
0
0

I've being looking around on the internet and either nobody else has this problem, or nobody else can solve it. I used the deadsnake repository to use Python 3.8, which seems to work, but when I try to get pip it starts complaining about not having distutils.cmd. This is WSL Ubuntu 22.04. There shouldn't be a *.cmd anything.

Online everybody who claims to know tells me use apt install python3-pip. This just installs python3.10 even though the article was about getting python3.8. Everywhere I look specifically for how to do it on WSL, they either don't tell me anything different, or they leave pip out.

Here is the main article I was following: https://www.linuxcapable.com/install-python-3-8-on-ubuntu-linux/#:~:text=Install%20Python%20PIP%20with%203.8%20on%20Ubuntu%20Linux,the%20following%20APT%20command.%20sudo%20apt%20install%20python3-pip

Does anyone know a way to fix this?

EDIT: Here's the error message.

Traceback (most recent call last):  File "get-pip.py", line 32267, in <module>    main()  File "get-pip.py", line 135, in main    bootstrap(tmpdir=tmpdir)  File "get-pip.py", line 111, in bootstrap    monkeypatch_for_cert(tmpdir)  File "get-pip.py", line 92, in monkeypatch_for_cert    from pip._internal.commands.install import InstallCommand  File "<frozen zipimport>", line 259, in load_module  File "/tmp/tmp4nc0p6x0/pip.zip/pip/_internal/commands/__init__.py", line 9, in <module>  File "<frozen zipimport>", line 259, in load_module  File "/tmp/tmp4nc0p6x0/pip.zip/pip/_internal/cli/base_command.py", line 15, in <module>  File "<frozen zipimport>", line 259, in load_module  File "/tmp/tmp4nc0p6x0/pip.zip/pip/_internal/cli/cmdoptions.py", line 24, in <module>  File "<frozen zipimport>", line 259, in load_module  File "/tmp/tmp4nc0p6x0/pip.zip/pip/_internal/cli/parser.py", line 12, in <module>  File "<frozen zipimport>", line 259, in load_module  File "/tmp/tmp4nc0p6x0/pip.zip/pip/_internal/configuration.py", line 26, in <module>  File "<frozen zipimport>", line 259, in load_module  File "/tmp/tmp4nc0p6x0/pip.zip/pip/_internal/utils/logging.py", line 29, in <module>  File "<frozen zipimport>", line 259, in load_module  File "/tmp/tmp4nc0p6x0/pip.zip/pip/_internal/utils/misc.py", line 43, in <module>  File "<frozen zipimport>", line 259, in load_module  File "/tmp/tmp4nc0p6x0/pip.zip/pip/_internal/locations/__init__.py", line 66, in <module>  File "<frozen zipimport>", line 259, in load_module  File "/tmp/tmp4nc0p6x0/pip.zip/pip/_internal/locations/_distutils.py", line 20, in <module>ModuleNotFoundError: No module named 'distutils.cmd'

Viewing all articles
Browse latest Browse all 2797

Trending Articles



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