Forums

xgboost not working

hello I am trying to import xgboost module

I have installed it : $ pip3.6 install --user xgboost

but when I run from notebook : import xgboost as xgb

I have the following error :

XGBoostError: XGBoost Library (libxgboost.so) could not be loaded. Likely causes: * OpenMP runtime is not installed (vcomp140.dll or libgomp-1.dll for Windows, libgomp.so for UNIX-like OSes) * You are running 32-bit Python on a 64-bit OS Error message(s): ["/usr/lib/x86_64-linux-gnu/libgomp.so.1: version `GOMP_4.0' not found (required by /home/gregwallaon3pi/.local/lib/python3.6/site-packages/xgboost/./lib/libxgboost.so)"]

Does anyone have successfully imported it on pythonanywhere ?

Hi there, have you tried searching in the PythonAnywhere forums etc for xgboost installation posts, and also trying what previous posters did to install xgboost?

Hello Conrad, following your reply I tried to follow post installation step of : https://www.pythonanywhere.com/forums/topic/12185/

I did : git clone --recursive https://github.com/dmlc/xgboost cd xgboost make -j4 cd python-package python setup.py develop --user

(I did not remove xgboost installed via pip)

But still when I import xgboost the message I get is the same .... thus my question remains open.

It might be worth trying again after completely restarting your Jupyter kernel -- to do that, go to the "Consoles" page and use the "Running processes" list at the bottom of the page to kill all processes with names like "jupyter", "sudospawner" or "ipython". Once that's done, go back to the notebook and select the "Restart kernel and run all cells" option, and see if the behaviour is different.