简体   繁体   English

ImportError:没有名为numpy.distutils.core的模块(Ubuntu xgboost安装)

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

I recently downloaded Ubuntu 14.04 desktop version alongside Windows 10. 我最近在Windows 10下载了Ubuntu 14.04桌面版。

My PC configs are: 4 GB RAM, 64 bit 我的PC配置是:4 GB RAM,64位

I installed Anaconda after downloading the file using: bash Anaconda3-2.5.0-Linux-x86_64.sh 我使用以下命令安装Anaconda:bash Anaconda3-2.5.0-Linux-x86_64.sh

Installation was successful. 安装成功。

Now in my ubuntu terminal, I follwed steps as instructed on http://xgboost.readthedocs.org/en/latest/build.html#building-on-ubuntu-debian 现在在我的ubuntu终端中,我按照http://xgboost.readthedocs.org/en/latest/build.html#building-on-ubuntu-debian上的说明进行了操作。

  1. Installed a recent GNU C++ compiler -->successful 安装了最近的GNU C ++编译器 - >成功
  2. git clone --recursive https://github.com/dmlc/xgboost cd xgboost; git clone --recursive https://github.com/dmlc/xgboost cd xgboost; make -j4 make -j4

Building was also successful and I could build 'libxgboost.so' 建设也很成功,我可以建立'libxgboost.so'

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

The 5. command returns an error after a lot of lines: 5.命令在很多行后返回错误:

'ImportError: No module named numpy.distutils.core' 'ImportError:没有名为numpy.distutils.core的模块'

Can anyone suggest how to get rid of this error so that I can install xgboost ? 任何人都可以建议如何摆脱这个错误,以便我可以安装xgboost?

I 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 . 我认为问题是你列出的Python安装过时的说明,因为它们现在已经启用了pip install

Delete the xgboost directory that your above install attempt created, and then execute: 删除上面安装尝试创建的xgboost目录,然后执行:

pip install xgboost

It should all work with one command. 它应该都可以使用一个命令。 See also the Python Specific XGBoost Install Instructions . 另请参阅Python特定XGBoost安装说明

This issue is listed in xgboost's github 此问题在xgboost的github中列出

The solution is 解决方案是

sudo -s sudo -s

python setup.py install python setup.py安装

instead of 代替

cd python-package; cd python-package; sudo python setup.py install sudo python setup.py安装

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ImportError:没有名为numpy.distutils.core的模块(在安装keras期间) - ImportError: No module named numpy.distutils.core (during keras installation) ImportError:在 Windows/Python 中安装 XGBoost 时没有名为 numpy.distutils.core 的模块 - ImportError: No module named numpy.distutils.core while installing XGBoost in Windows/Python ImportError:安装 Numpy 后,Ubuntu 上没有名为 numpy 的模块 - ImportError: No module named numpy on Ubuntu after Numpy Installation 导入错误:没有名为 distutils 的模块 - ImportError: No module named distutils 如何将库编译添加到numpy.distutils.core? - how to add library compilation to numpy.distutils.core? statsmodels安装:numpy.distutils中没有名为“ numpy.distutils._msvccompiler”的模块; 从distutils尝试 - statsmodels installation: No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils ImportError:没有名为“ xgboost”的模块 - ImportError: No module named 'xgboost' 导入错误:没有名为 xgboost 的模块 - ImportError: No module named xgboost python numpy ImportError:没有名为核心的模块 - python numpy ImportError: No module named core 导入错误:没有名为 Cython.Distutils 的模块 - ImportError: No module named Cython.Distutils
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM