问题
I am running ubuntu 20.04 with python 3.8, 3.7, and 3.6 installed. I am trying to install some packages using pip on 3.7 and 3.6 versions using 'python3.7 -m pip install package' but, I am getting ModuleNotFoundError: No module named 'distutils.util
error. I have disutils
installed but it works for python 3.8. Is there a workaround to install packages on python 3.7 and 3.6?
回答1:
1) Run update command to update package repositories and get latest package information
sudo apt-get update -y
2) Run the install command with -y flag to quickly install the packages and dependencies.
sudo apt-get install -y python-distutils-extra
or
go to this site, there is more details. https://ubuntu.pkgs.org/18.04/ubuntu-universe-amd64/python-distutils-extra_2.41ubuntu1_all.deb.html
来源:https://stackoverflow.com/questions/61567990/how-to-install-python-distutils