鍍金池/ 問答/Python  Linux/ ubuntu系統(tǒng)安裝python報錯

ubuntu系統(tǒng)安裝python報錯

報錯如圖圖片描述

ModuleNotFoundError: No module named 'distutils.core'

回答
編輯回答
巫婆

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.

2018年6月30日 03:14
編輯回答
落殤

sudo apt-get install python-distutils-extra 試試看

2017年2月3日 04:55
編輯回答
維她命

推薦使用 virtualenv 建立虛擬 python 環(huán)境,以免和系統(tǒng)的 python 產生沖突,進而影響系統(tǒng)其他應用。

或使用 Miniconda 的 python 發(fā)行版( https://conda.io/miniconda.html ),用這個做科學計算更方便。

2018年3月31日 09:09