当前位置: 首页 > 工具软件 > setup-msys2 > 使用案例 >

python32bitxgboost_package - Install xgboost under python with 32-bit msys failing

江飞白
2023-12-01

Trying to install xgboost is failing..? The version is Anaconda 2.1.0 (64-bit) on Windows & enterprise. How do I proceed? I have been using R it seems its quite easy to install new package in R from RStudio, but not so in spyder as I need to go to a command-window to do it and then in this case it fails..

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

python

package

failed-installation

msys

xgboost

|

this question

edited Sep 4 '15 at 6:16

sinhayash 1,247 7 38 asked Aug 27 '15 at 20:04

kayama 151 2 12      This question has been crossposted from

Kaggle "How to XGBoost in Python 3.4.3 | Anaconda 2.2.0 (64-bit)" where we have been helping diagnose it –

smci Sep 3 '15 at 7:41

|

2 Answers

2

I'm a bit late to answer but I would still go ahead and answer it for anyone who still has an issue with the installation. I followed the steps listed in https://www.kaggle.com/c/otto-group-product-classification-challenge/forums/t/13043/run-xgboost-from-windows-and-python Their is a concise version of these steps at https://github.com/dmlc/xgboost/tree/master/windows. I will summarize what I did below.

1) Download Visual Basic Studio. You can download the community edition at visual studio website. There is a "free visual studio button on the upper right corner"

2) Copy all content from the git hub repository of xgboost/tree/master/windows and Open Visual studio existing project on Visual studio

3) There are a couple of drop down menus you need to select ( "Release" and "X64" and then select build --> build all from the upper menu. It should look something like the attached screenshot.

4) if you see the message ========== Build: 3 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========, it is all good

5) Browse to python-packages folder where the setup file for XGB resides and run the install command 'python setup.py install'.

Hope this helps.

|

this answer

edited Jan 20 '16 at 22:05 answered Jan 19 '16 at 5:11

Falconic 43 9      Do you mind mentioning why my post is down voted? –

Falconic Jan 20 '16 at 0:02      Generally, link only answers are frowned upon. It's better to summarise the content from the link in case the links dies of it's content changes. –

Steve Jan 20 '16 at 0:09      Thanks for explaining. I would update my answer. –

Falconic Jan 20 '16 at 21:54

|

This is an xgboost issue, not an Anaconda issue as you originally tagged (I don't use Anaconda but I got this too).rect and try again. then I skip step1 and did step 2 directly, another error appear: Traceback (most recent call last): File "setup.py", line 19, in LIB_PATH = libpath['find_lib_path']() File "xgboost/libpath.py", line 44,

EDIT: from your updates, your breakage is caused by 32-bit msys somewhere on your path, whereas you have a 64-bit install of Python. Mine and all other people's reported breakage since Aug 25 was the 0.4a12/3 prereleases:

ORIGINAL ANSWER - Based on the limited information you provided (here, as opposed to on the Kaggle thread) and no verbose fail logs: Apparently the latest versions of xgboost on pypi, 0.4a12 and 0.4a13 are both pre-releases, which pip will not use by default, unless you do pip install --pre xgboost.

I found this all out by digging around with pip install -v xgboost, which shows helpful verbose information on why an attempted install failed (below); then use pip help and pip install -h to see all install options:

pip install -v xgboost Downloading/unpacking xgboost 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).

Then pip install -h tells you:

Install Options:

-e, --editable Install a project in editable mode ...

...

--pre Include pre-release and development versions. By default, pip only finds stable versions.

And finally:

pip install --pre xgboost

(PS xgboost maintainers made a recent change in Aug 2015)

|

this answer

edited Sep 3 '15 at 7:43 answered Aug 29 '15 at 3:36

smci 9,151 5 44 83      I use pip install --pre xgboost but still no luck and I am getting error similar to this thread.

kaggle.com/c/… –

kayama Aug 31 '15 at 21:20      I was saying do

pip install -v xgboost to see the verbose reason for failure, then post it as part of your question. Knowing the exact reason for failure should solve/help solve your issue. –

smci Aug 31 '15 at 23:14      Thanks for the response. Heres the screen dump for using pip install -v xgboost –

kayama Sep 1 '15 at 16:42      The screen dump is too big to add in the comment box...? However, I follow the instruction on the below link and build the package on the window box and it works !!!

kaggle.com/c/… –

kayama Sep 1 '15 at 17:15      Ok so the root-cause issue is your copy of MinGW/msys was 32-bit not 64-bit. However that thread is still unclear as to the

solution. Please spell out the solution and post it here as answer to your own question. –

smci Sep 1 '15 at 21:46

|

boost. While trying to "make" the xgboost i am getting the below error: C:\GitRepository\xgboost>g++ -m64 -c -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -fopenmp -fPIC -o updater.o src/tree/updater.cppsrc/tree/updater.cpp:1:0

 类似资料:

相关阅读

相关文章

相关问答