ImportError: No module named numpy.distutils.core (Ubuntu xgboost installation)

ImportError: No module named numpy.distutils.core (Ubuntu xgboost installation)

我最近下载了 Ubuntu 14.04 桌面版和 Windows 10.

我的电脑配置是:4 GB 内存,64 位

我使用以下方法下载文件后安装了 Anaconda: bash Anaconda3-2.5.0-Linux-x86_64.sh

安装成功。

现在在我的 ubuntu 终端中,我按照 http://xgboost.readthedocs.org/en/latest/build.html#building-on-ubuntu-debian

上的指示执行了步骤
  1. 安装了最新的 GNU C++ 编译器 --> 成功
  2. git 克隆 --recursive https://github.com/dmlc/xgboost cd xgboost;制作-j4

搭建也成功了,可以搭建了'libxgboost.so'

  1. sudo apt-get install python-setuptools(成功)
  2. cd python-包
  3. sudo python setup.py 安装

5.命令returns多行后报错:

'ImportError: No module named numpy.distutils.core'

任何人都可以建议如何摆脱这个错误,以便我可以安装 xgboost 吗?

我今天遇到了同样的问题。我认为问题是您列出的说明对于 Python 安装已过时,因为它们现在已通过 pip install.

启用

删除上述安装尝试创建的 xgboost 目录,然后执行:

pip install xgboost

它应该全部使用一个命令。另见 Python Specific XGBoost Install Instructions.

此问题已在 xgboost's github

中列出

解决方法是

sudo -s

python setup.py install

而不是

cd python-package; sudo python setup.py install