Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
324 views
in Technique[技术] by (71.8m points)

windows - No module named pip - Python 3.9

I normally do not use python, but needed it now. So I installed python 3.9 (on Ubuntu/WSL2 subsystem on Windows 10).

I need pip to. I thought it should be there by default (but it was not there):

Starting with Python 3.4, it is included by default with the Python binary installers. (https://docs.python.org/3/installing/index.html)

So I went on to the next page (https://packaging.python.org/tutorials/installing-packages/). It told me to do

python -m ensurepip --default-pip

This did not work either. So I tested next instructions:

sudo wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py

This failed with

ModuleNotFoundError: No module named 'distutils.command'

Am I doing something wrong? Or is there a bug somewhere?

question from:https://stackoverflow.com/questions/65928875/no-module-named-pip-python-3-9

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

It looks like a documentation error. I followed the instructions here and that worked:

https://askubuntu.com/questions/1239829/modulenotfounderror-no-module-named-distutils-util


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...