[PYTHON] I got an error when trying to install Xgboost and its solution

When I tried to install Xgboost, I got an error, so record it along with the solution.

environment

environment


macOS version 10.15.4(Catalina)
anaconda3-5.3.1

error

ERROR


ERROR: Command errored out with exit status 1:
    (Omission)
   ./xgboost/build-python.sh: line 27: cmake: command not found
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/15//xgboost/setup.py", line 42, in <module>
        LIB_PATH = libpath['find_lib_path']()
      File "/private/var/folders/15//xgboost/libpath.py", line 50, in find_lib_path
        'List of candidates:\n' + ('\n'.join(dll_path)))
    XGBoostLibraryNotFound: Cannot find XGBoost Library in the candidate path, did you install compilers and run build.sh in root path?
    List of candidates:
    /private/var/folders/15/###############################
    /private/var/folders/15/###############################
    /private/var/folders/15/###############################
    /Users//.pyenv/versions/anaconda3-5.3.1/###############################
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

What I did ①

pip install --upgrade pip setuptools

I got an error statement, so I ran it for the time being. Upgraded but not resolved

What I did ②

brew install gcc@8

This also came out, so I ran it for the time being. I installed it but it didn't work

solution

After all, I decided to read the error message properly Then I found this message.

Error


./xgboost/build-python.sh: line 27: cmake: command not found

I'm telling you to do cmake, but I don't know what it is.

** This is it! !! !! !! So, I immediately executed the installation. ** **

terminal


pip install cmake

cmake is installed. Then the favorite xg boost

terminal


pip install xgboost

-----
Successfully built xgboost
Installing collected packages: xgboost
Successfully installed xgboost-1.0.2
-----

I was able to install xgboost! !! !!

Recommended Posts

I got an error when trying to install Xgboost and its solution
I get an error when trying to install maec 4.0.1.0 with pip
I got an error when trying to run Hello World in Go language
I got an error when I ran meteor add accounts-password and got hooked
Error when trying to install psycopg2 in Python
Workaround if you get an error when trying to install PySide with pip
I get an error when trying meinheld + WebSocket + mongodb
I got an error when using Tensorboard with Pytorch
I got an error when pip install pandas on Mac, so I dealt with it
I got an error in vim and zsh in Python 3.7 series
I get [Error 2055] when trying to connect to MySQL on Heroku
I got an error when pip install tweepy on macOS Sierra, so I dealt with it
Error and solution when trying to run a classifier made with Labellio with my own ubuntu
When I installed python on macOS and used it, I got an error when I put an https connection
# Solution when pip install gives an error when using Anaconda on Windows 10
I got an error when I ran composer global require laravel / installer
When I get an error with PyInstaller
I got an SSL related error with pip install, so I solved it
What to do if you get an error when trying to load mnist
A story about trying to install uwsgi on an EC2 instance and failing
[Python] I want to know the variables in the function when an error occurs!
An error occurs when trying to import scikit-learn after connecting to Oracle with SQLAlchemy
Error that occurred in OpenCV3 and its solution Precautions when using OpenCV3 on Mac
I got stuck when trying to specify a relative path with relative_to () in python
When I try to install mysqlclient with Django, I get error: command'gcc' failed with exit status 1.
sphinx-quickstart got messy and I tried to create an alternative command and the stress disappeared
I get an error when I try to raise Python to 3 series using pyenv on Catalina
I got an error that Python couldn't read settings.ini
When I tried to introduce python3 to atom, I got stuck
I got a UnicodeDecodeError when pip install on ubuntu
I get an error when I put opencv in pyautoGUI
An error related to saas occurred during bundle install
A memorandum when an error occurs with pip install
I tried to install scrapy on Anaconda and couldn't
When I tried to install PIL and matplotlib in a virtualenv environment, I was addicted to it.
Solution when pip install from other than the official website and SSL Error (SSL authentication error) occurs
When creating a pipenv environment, I got addicted to "Value Error: Not a valid python path"
I was surprised to receive a nice review when I wrote Python to CheckIO and its explanation
When I tried to install Ubuntu 18.04, "Initramfs unpacking failed: Decoding failed" was displayed and the startup failed.
[Solution] When I try to connect to CloudSQL with GAE, I get an ImportError only when using dev_appserver.
What to do if you get an Undefined error when trying to use pip with pyenv
I got a Value Error when using JUMAN ++ with PyKNP
What to do when an error occurs with import _ssl
I stumbled when I tried to install Basemap, so a memorandum
Stumble when trying to share clipboard between VirtualBox and Mac
Ubuntu 20.04 does not start when trying to install nvidia driver
I got an SSL Error when I installed Anaconda in a new environment, so I solved it (Windows10, Anaconda3-2019.10)
About the error I encountered when trying to use Adafruit_DHT from Python on a Raspberry Pi
When I try to execute the make command of Makefile with os / exec of golang, the second and subsequent executions result in an error.
I got an AttributeError when mocking the open method in python
[Beanstalk] What to do when an error occurs with import uuid
Error and solution when installing python3 with homebrew on mac (catalina 10.15)
When I get an error with Pylint in Atom on Windows
[Python] Error and solution memo when using venv with pyenv + anaconda
Solution when an error occurs when hiding the console screen with PyInstaller
I got stuck trying to install various things with Mac El captain pip, so make a note