-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installing XGboost in a Raspberry-pi #2012
Comments
remove -msse2 flag in compilation |
That's what I did before @tqchen. The output after the |
make sure you can xgboost library build outputted in the candidate path, it is likely that the build is not successful |
I think the problem comes from 'sudo build.sh': you don't have to 'sudo', otherwise it may build the .so somewhereelse |
Forgot to mention: just make with the modified .mk, no need to run 'build.sh' since it just calls make again |
Okay, thanks for your answers @tqchen and @phunterlau , but problem is still there. Now I am trying to install it at Even following the steps, the error is still the same: pi@raspberrypi:/usr/lib/python2.7/dist-packages/xgboost/python-package $ sudo python setup.py install
Traceback (most recent call last):
File "setup.py", line 19, in <module>
LIB_PATH = [os.path.relpath(libfile, CURRENT_DIR) for libfile in libpath['find_lib_path']()]
File "xgboost/libpath.py", line 46, in find_lib_path
'List of candidates:\n' + ('\n'.join(dll_path)))
__builtin__.XGBoostLibraryNotFound: Cannot find XGBoost Library in the candidate path, did you install compilers and run build.sh in root path?
List of candidates:
/usr/lib/python2.7/dist-packages/xgboost/python-package/xgboost/libxgboost.so
/usr/lib/python2.7/dist-packages/xgboost/python-package/xgboost/../../lib/libxgboost.so
/usr/lib/python2.7/dist-packages/xgboost/python-package/xgboost/./lib/libxgboost.so
/usr/xgboost/libxgboost.so |
Hello @xrr47, not sure if you've figured out the problem by now but I faced the same issue when compiling mine. Apparently the build was reported as "successful" but actually not so. If you look at your compile log carefully you should see errors like,
That means your build did not include the necessary libraries thus your reported error. Strangely this issue was supposedly fixed in #1932 but I still do not see the mentioned folders under xgboost/python-packages/, only under the main xgboost/ which is one level up. So I symlinked them and the build was completed without complaining, well, apart from no pyo and pyc files found. I could then import xgboost in Jupyter and read in data via xgb.DMatrix but as soon as I start training the kernel crashes without giving an error. Any ideas? @tqchen @phunterlau |
I figured it out. Below are step-by-step instructions that work as of today (Jan 14 2018) to install XGBoost for Python 3 on a Raspberry Pi 3 with the newest Raspian version (stretch). First, update your system's package list by entering the following command: Then, in principle, you can follow the instructions here for Debian/Ubuntu: First, clone the GIT directory: In the subdirectory/xgboost/rabit/, edit Makefile, line 22, to get rid if the -msse2 flag. It should simply read: Change back to the xgboost subdirectory, and type: To make and install the Python package (use Python3 to be sure it installs to the right Python): |
Hi,
I trained a model in a computer and now I am trying to put it in a r-pi, but I am not able to download the package. My intention is only to predict some values using the model, built in a more powerful pc.
I did follow the two possible ways recommended in the Github but I failed in both. I copy all the methods and errors obtained:
From the Github
My steps here are a mix of some steps I read:
git clone --recursive https://github.com/dmlc/xgboost cd xgboost
I read to modify the
Makefile
by deleting -msse2 flag, and I did it to allowmake
command to be launched. After that I did:cp make/minimum.mk ./config.mk make -j4 sudo ./build.sh cd python-package sudo python setup.py install
And the results obtained:
Thanks in advance
The text was updated successfully, but these errors were encountered: