gpt4 book ai didi

python - 在 32 位 msys 失败的 python 下安装 xgboost

转载 作者:太空狗 更新时间:2023-10-29 21:49:40 27 4
gpt4 key购买 nike

尝试安装 xgboost 失败..?Windows 和企业版版本为 Anaconda 2.1.0(64 位)。我该如何进行?我一直在使用 R,似乎很容易从 RStudio 在 R 中安装新包,但在 spyder 中并非如此,因为我需要转到命令窗口来执行此操作,然后在这种情况下它会失败。

import sys

print (sys.version)
2.7.8 |Anaconda 2.1.0 (64-bit)| (default, Jul 2 2014, 15:12:11) [MSC v.1500 64 bit (AMD64)]

C:\anaconda\Lib\site-packages>pip install -U xgboost
Downloading/unpacking xgboost
Could not find a version that satisfies the requirement xgboost (from versions: 0.4a12, 0.4a13)
Cleaning up...
No distributions matching the version for xgboost
Storing debug log for failure in C:\Users\c_kazum\pip\pip.log


------------------------------------------------------------
C:\Users\c_kazum\AppData\Local\Continuum\Anaconda\Scripts\pip-script.py run on 08/27/15 12:52:30
Downloading/unpacking xgboost
Getting page https://pypi.python.org/simple/xgboost/
URLs to search for versions for xgboost:
* https://pypi.python.org/simple/xgboost/
Analyzing links from page https://pypi.python.org/simple/xgboost/
Found link https://pypi.python.org/packages/source/x/xgboost/xgboost-0.4a12.tar.gz#md5=4d768e034a28590497bb79279f036946 (from https://pypi.python.org/simple/xgboost/), version: 0.4a12
Found link https://pypi.python.org/packages/source/x/xgboost/xgboost-0.4a13.tar.gz#md5=5f53d51e4305c679192b3cabda2b0dbe (from https://pypi.python.org/simple/xgboost/), version: 0.4a13
Ignoring link https://pypi.python.org/packages/source/x/xgboost/xgboost-0.4a12.tar.gz#md5=4d768e034a28590497bb79279f036946 (from https://pypi.python.org/simple/xgboost/), version 0.4a12 is a pre-release (use --pre to allow).
Ignoring link https://pypi.python.org/packages/source/x/xgboost/xgboost-0.4a13.tar.gz#md5=5f53d51e4305c679192b3cabda2b0dbe (from https://pypi.python.org/simple/xgboost/), version 0.4a13 is a pre-release (use --pre to allow).
Could not find a version that satisfies the requirement xgboost (from versions: 0.4a12, 0.4a13)
Cleaning up...
Removing temporary dir c:\users\c_kazum\appdata\local\temp\pip_build_c_kazum...
No distributions matching the version for xgboost
Exception information:
Traceback (most recent call last):
File "C:\Users\c_kazum\AppData\Local\Continuum\Anaconda\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "C:\Users\c_kazum\AppData\Local\Continuum\Anaconda\lib\site-packages\pip\commands\install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "C:\Users\c_kazum\AppData\Local\Continuum\Anaconda\lib\site-packages\pip\req.py", line 1177, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File "C:\Users\c_kazum\AppData\Local\Continuum\Anaconda\lib\site-packages\pip\index.py", line 322, in find_requirement
raise DistributionNotFound('No distributions matching the version for %s' % req)
DistributionNotFound: No distributions matching the version for xgboost

最佳答案

我回答有点晚了,但我仍然会继续为仍然对安装有问题的任何人回答。我按照中列出的步骤 https://www.kaggle.com/c/otto-group-product-classification-challenge/forums/t/13043/run-xgboost-from-windows-and-python他们是这些步骤的简明版本,位于 https://github.com/dmlc/xgboost/tree/master/windows .我将在下面总结我所做的。

1) 下载 Visual Basic Studio。您可以在 visual studio 网站下载社区版。右上角有个“免费visual studio按钮”

2) 从xgboost/tree/master/windows 的git hub 存储库中复制所有内容,并在Visual studio 上打开Visual studio 现有项目

3) 您需要选择几个下拉菜单(“Release”和“X64”,然后从上方菜单中选择 build --> build all。它看起来应该类似于所附的屏幕截图。

4) 如果您看到消息 ========== Build: 3 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========, 它是一切顺利

5) 浏览到 XGB 安装文件所在的 python-packages 文件夹,然后运行安装命令“python setup.py install”。

希望这对您有所帮助。

关于python - 在 32 位 msys 失败的 python 下安装 xgboost,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32258463/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com