简体   繁体   English

在 Anaconda 上安装 xgboost 时遇到问题

[英]Trouble installing xgboost on Anaconda

I have tried doing a pip install of xgboost and was unsuccessful due to the firewall setting on my company computer.我尝试过安装 xgboost 的 pip 并且由于我公司计算机上的防火墙设置而没有成功。

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000002000411CD48>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/xgboost/

I have tried downloading a xgboost 0.90 package from the following site: https://anaconda.org/anaconda/py-xgboost/files and did a conda install of it.我尝试从以下站点下载 xgboost 0.90 package: https://anaconda.org/anaconda/py-xgboost/files并进行了 conda 安装。 No errors were produced during the installation process.在安装过程中没有产生任何错误。 When I tried importing it, there was an error.当我尝试导入它时,出现了错误。

Traceback (most recent call last):

  File "C:\Users\abcd\Documents\Python Scripts\test manual installations.py", line 10, in <module>
    from xgboost import XGBClassifier, plot_importance

  File "C:\ProgramData\Anaconda3\lib\site-packages\xgboost\__init__.py", line 11, in <module>
    from .core import DMatrix, Booster

  File "C:\ProgramData\Anaconda3\lib\site-packages\xgboost\core.py", line 161, in <module>
    _LIB = _load_lib()

  File "C:\ProgramData\Anaconda3\lib\site-packages\xgboost\core.py", line 123, in _load_lib
    lib_paths = find_lib_path()

  File "C:\ProgramData\Anaconda3\lib\site-packages\xgboost\libpath.py", line 52, 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:
C:\ProgramData\Anaconda3\Library\mingw-w64\bin\xgboost.dll
C:\ProgramData\Anaconda3\lib\site-packages\xgboost\../../windows/x64/Release/xgboost.dll
C:\ProgramData\Anaconda3\lib\site-packages\xgboost\./windows/x64/Release/xgboost.dll

Would appreciate any help on how to solve the error from the traceback.对于如何解决回溯中的错误,我们将不胜感激。 Or other alternatives to install xgboost that would not involve a pip install.或其他不涉及 pip 安装的 xgboost 替代方法。 Thanks.谢谢。

I ended up downloading the xgboost whl file from the following website: https://www.lfd.uci.edu/~gohlke/pythonlibs/#xgboost and ran a pip install of it.我最终从以下网站下载了 xgboost whl 文件: https://www.lfd.uci.edu/~gohlke/pythonlibs/#xgboost并运行了 pip 安装。 Seems to be working now.似乎现在正在工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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