Ubuntu system installation python error

report an error as shown in the figure

ModuleNotFoundError: No module named "distutils.core"

Mar.16,2021

it is recommended to use virtualenv to establish a virtual python environment to avoid conflicts with the python of the system and affect other applications of the system.

or use the python distribution of Miniconda ( https://conda.io/miniconda.html), which is more convenient for scientific calculations.


sudo apt-get install python-distutils-extra try


had the same problem today. I believe the issue is the instructions you listed are out of date for Python installs, as they are now enabled with pip install.

Delete the xgboost directory that your above install attempt created, and then execute:

pip install xgboost
It should all work with one command. See also the Python Specific XGBoost Install Instructions.

Menu