ubuntu系统安装python报错

报错如图图片描述

ModuleNotFoundError: No module named 'distutils.core'

阅读 3.2k
3 个回答

推荐使用 virtualenv 建立虚拟 python 环境,以免和系统的 python 产生冲突,进而影响系统其他应用。

或使用 Miniconda 的 python 发行版( https://conda.io/miniconda.html ),用这个做科学计算更方便。

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

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.

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进