简体   繁体   中英

Xgboost installation issue on windows on python

I am trying to install the Xgboost library. The problem is that I am on a virtual machine behind a firewall i don't have access to (company computer). I have the Xgboost library that I downloaded from github.

Then I tried to add the path manually to through the Pycharm project interpreter, therefor i don't have any import error detected, the auto completion is even working but when I try to run the code I have this error :

Traceback (most recent call last): File "C:/Users/UT2BUP/PycharmProjects/AccountingAdjustment/Run/Execution.py", line 1, in from Run.Main import Main File "C:\\Users\\UT2BUP\\PycharmProjects\\AccountingAdjustment\\Run\\Main.py", line 22, in import Modeling.SkLearnHelper as Sk File "C:\\Users\\UT2BUP\\PycharmProjects\\AccountingAdjustment\\Modeling\\SkLearnHelper.py", line 35, in import Modeling.Stacking as Stk File "C:\\Users\\UT2BUP\\PycharmProjects\\AccountingAdjustment\\Modeling\\Stacking.py", line 6, in import xgboost as xg File "C:\\Users\\UT2BUP\\Downloads\\xgboost-master\\python-package\\xgboost__init__.py", line 11, in from .core import DMatrix, Booster File "C:\\Users\\UT2BUP\\Downloads\\xgboost-master\\python-package\\xgboost\\core.py", line 112, in _LIB = _load_lib() File "C:\\Users\\UT2BUP\\Downloads\\xgboost-master\\python-package\\xgboost\\core.py", line 103, in _load_lib lib_path = find_lib_path() File "C:\\Users\\UT2BUP\\Downloads\\xgboost-master\\python-package\\xgboost\\libpath.py", line 46, in find_lib_path 'Li st of candidates:\\n' + ('\\n'.join(dll_path)))

xgboost.libpath.XGBoostLibraryNotFound: Cannot find XGBoost Library in the candidate path, did you install compilers and run build.sh in root path? List of candidates: C:\\Users\\UT2BUP\\Downloads\\xgboost-master\\python-package\\xgboost\\libxgboost.dll C:\\Users\\UT2BUP\\Downloads\\xgboost-master\\python-package\\xgboost../../lib/libxgboost.dll C:\\Users\\UT2BUP\\Downloads\\xgboost-master\\python-package\\xgboost./lib/libxgboost.dll C:\\ProgramData\\Anaconda3\\xgboost\\libxgboost.dll C:\\Users\\UT2BUP\\Downloads\\xgboost-master\\python-package\\xgboost../../windows/x64/Release/libxgboost.dll C:\\Users\\UT2BUP\\Downloads\\xgboost-master\\python-package\\xgboost./windows/x64/Release/libxgboost.dll

So I tried to install with PIP in local but when I do

python pip install C:\Users\UT2BUP\Downloads\xgboost-master\python-package

I got the same error as above (2nd part only).
Any ideas ?

The most straightforward way is to download the xgboost wheel and install using pip.

pip install xgboost‑0.6‑cp36‑cp36m‑win_amd64.whl

The other option is what you are trying to do now. To build from source, you have to make sure your compiler is set up. For instructions on that, I suggest you start on the Windows Compilers page, then visit the docs for compiling xgboost .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM