2015-08-27 22 views
7

Provare a installare xgboost non funziona ...? La versione è Anaconda 2.1.0 (64-bit) su Windows & enterprise. Come procedo? Ho usato R sembra abbastanza facile installare un nuovo pacchetto in R da RStudio, ma non così in spyder perché ho bisogno di andare in una finestra di comando per farlo e quindi in questo caso fallisce ..Installa xgboost in python con msys a 32 bit non funzionante

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 
+0

Questa domanda è stata crosspost da [Kaggle "Come XGBoost in Python 3.4.3 | Anaconda 2.2.0 (64-bit)"] (https://www.kaggle.com/c/liberty-mutual-group -property-inspection-prediction/forums/t/16120/how-to-xgboost-in-python-3-4-3-anaconda-2-2-0-64-bit) dove abbiamo contribuito a diagnosticarlo – smci

risposta

2

Questo è un problema di xgboost, non un problema di Anaconda come originariamente etichettato (non uso Anaconda ma ho ottenuto anche questo).

MODIFICA: dai tuoi aggiornamenti, la tua rottura è causata da msys a 32 bit da qualche parte sul tuo percorso, mentre tu hai un'installazione a 64 bit di Python. La mia e tutte le altre persone ha riferito di rottura da 25 Agosto è stato il 0.4a12/3 prerelease:


RISPOSTA ORIGINALE - Sulla base delle informazioni limitate che hai fornito (qui, a differenza sul filo Kaggle) e non verbose falliscono registri: Apparentemente il latest versions of xgboost on pypi, 0.4a12 and 0.4a13 sono entrambi i pre-rilasci, che pip non utilizzerà per impostazione predefinita, a meno che non lo si faccia pip install --pre xgboost.

Ho trovato tutto questo scavando con pip install -v xgboost, che mostra informazioni dettagliate utili sul perché un'installazione tentata non è riuscita (sotto); quindi utilizzare pip help e pip install -h per visualizzare tutte le opzioni di installazione:

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). 

Poi pip install -h ti dice:

Install Options: 
    -e, --editable <path/url> Install a project in editable mode ... 
    ... 
    --pre      Include pre-release and development versions. By default, pip only finds stable versions. 

E infine:

pip install --pre xgboost 

(manutentori PS xgboost fatti a recent change in Aug 2015)

+0

I usa pip install --pre xgboost ma ancora senza fortuna e sto ricevendo un errore simile a questo thread. https://www.kaggle.com/c/liberty-mutual-group-property-inspection-prediction/forums/t/16120/how-to-xgboost-in-python-3-4-3-anaconda-2- 2-0-64-bit/90409 – Mookayama

+0

Stavo dicendo do ** 'pip install -v xgboost' per vedere il verboso motivo di errore, quindi pubblicalo ** come parte della tua domanda. Conoscere la ragione esatta del fallimento dovrebbe risolvere/aiutare a risolvere il tuo problema. – smci

+0

Grazie per la risposta. Ecco il dump dello schermo per l'uso di pip install -v xgboost – Mookayama

3

Sono un un po 'in ritardo per rispondere, ma vorrei ancora andare avanti e rispondere per chiunque abbia ancora un problema con l'installazione. Ho seguito i passaggi elencati in https://www.kaggle.com/c/otto-group-product-classification-challenge/forums/t/13043/run-xgboost-from-windows-and-python Loro è una versione concisa di questi passaggi a https://github.com/dmlc/xgboost/tree/master/windows. Riassumo ciò che ho fatto qui sotto.

1) Scarica Visual Basic Studio. Puoi scaricare l'edizione della community sul sito Web di Visual Studio. C'è un pulsante "Free Studio visivo in alto a destra"

2) Copiare tutti i contenuti dal repository hub git di xgboost/albero/master/finestre e aprire Visual progetto esistente in studio su Visual Studio

3 Ci sono un paio di menu a discesa che devi selezionare ("Rilascio" e "X64" e quindi selezionare build -> crea tutto dal menu superiore. Dovrebbe sembrare qualcosa come lo screenshot allegato

4) se vedi il messaggio ========== Build: 3 riuscito, 0 fallito, 0 aggiornato, 0 saltato ==========, è tutto buono

5) Passare alla cartella python-packages in cui risiede il file di installazione per XGB ed eseguire il comando di installazione "python setup.py install".

Spero che questo aiuti.

+0

Ti spiace menzionare il motivo per cui il mio post non è stato votato? – Falconic

+0

Generalmente, le sole risposte di collegamento sono disapprovate. È meglio riepilogare il contenuto del link nel caso in cui i link muoiano delle sue modifiche ai contenuti. – Steve

+0

Grazie per la spiegazione. Vorrei aggiornare la mia risposta. – Falconic