I recently downloaded Ubuntu 14.04 desktop version alongside Windows 10.
My PC configs are: 4 GB RAM, 64 bit
I installed Anaconda after downloading the file using: 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
Building was also successful and I could build 'libxgboost.so'
The 5. command returns an error after a lot of lines:
'ImportError: No module named numpy.distutils.core'
Can anyone suggest how to get rid of this error so that I can install xgboost ?
As a result, if don’t have numpy installed in your python, it’ll throw ImportError No Module Named Numpy. Either you need to change the environment to Anaconda’s environment or install numpy on the default environment. The process to install numpy on the default environment is already mentioned in the above (Windows) section.
Follow these steps to install numpy in Windows – Firstly, Open Command Prompt from the Start Menu. Enter the command pip install numpy and press Enter. Wait for the installation to finish. Test the installation by using import numpy command in Python Shell. Generally, in Ubuntu, there are multiple versions of Python installed.
This environment is separated from your outside installed python and can lead to import No Module Named Numpy errors. Usually, numpy is already installed in anaconda but to install numpy again in Anaconda – Open Anaconda Prompt from Start Menu. Enter the command conda install numpy and Hit Enter.
The module not found likely means the packages aren't installed. If they're already installed you can try to fix anything that may have been messed up in the upgrade with... Show activity on this post. I got this problem after upgrading to Ubuntu 20.04.
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
.
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.
This issue is listed in xgboost's github
The solution is
sudo -s
python setup.py install
instead of
cd python-package; sudo python setup.py install
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With