Unable to install XGBoost-1.0.0 on Mac

Viewed 215

I was having trouble with the current version of XGBoost, due to the utf encoding bug when using tree shap, and found that installing XGBoost-1.0.0 fixes this. However when running the command pip install xgboost==1.0.0 in the Mac terminal I get the following error:

Using cached xgboost-1.0.0.tar.gz (819 kB)
    ERROR: Command errored out with exit status 1:
     command: /Users/henrypalasciano/opt/anaconda3/envs/tf2/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/3z/g8bv7k0j2lv1bhkqgk_gn1mw0000gn/T/pip-install-wyss2dke/xgboost/setup.py'"'"'; __file__='"'"'/private/var/folders/3z/g8bv7k0j2lv1bhkqgk_gn1mw0000gn/T/pip-install-wyss2dke/xgboost/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/3z/g8bv7k0j2lv1bhkqgk_gn1mw0000gn/T/pip-pip-egg-info-erhfqrmu
         cwd: /private/var/folders/3z/g8bv7k0j2lv1bhkqgk_gn1mw0000gn/T/pip-install-wyss2dke/xgboost/
    Complete output (27 lines):
    ++ pwd
    + oldpath=/private/var/folders/3z/g8bv7k0j2lv1bhkqgk_gn1mw0000gn/T/pip-install-wyss2dke/xgboost
    + cd ./xgboost/
    + mkdir -p build
    + cd build
    + cmake ..
    ./xgboost/build-python.sh: line 21: cmake: command not found
    + echo -----------------------------
    -----------------------------
    + echo 'Building multi-thread xgboost failed'
    Building multi-thread xgboost failed
    + echo 'Start to build single-thread xgboost'
    Start to build single-thread xgboost
    + cmake .. -DUSE_OPENMP=0
    ./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/3z/g8bv7k0j2lv1bhkqgk_gn1mw0000gn/T/pip-install-wyss2dke/xgboost/setup.py", line 42, in <module>
        LIB_PATH = libpath['find_lib_path']()
      File "/private/var/folders/3z/g8bv7k0j2lv1bhkqgk_gn1mw0000gn/T/pip-install-wyss2dke/xgboost/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/3z/g8bv7k0j2lv1bhkqgk_gn1mw0000gn/T/pip-install-wyss2dke/xgboost/xgboost/libxgboost.dylib
    /private/var/folders/3z/g8bv7k0j2lv1bhkqgk_gn1mw0000gn/T/pip-install-wyss2dke/xgboost/xgboost/../../lib/libxgboost.dylib
    /private/var/folders/3z/g8bv7k0j2lv1bhkqgk_gn1mw0000gn/T/pip-install-wyss2dke/xgboost/xgboost/./lib/libxgboost.dylib
    /Users/henrypalasciano/opt/anaconda3/envs/tf2/xgboost/libxgboost.dylib
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Any help fixing this would be greatly appreciated!

0 Answers
Related