2014-09-26 21 views
6

Ho appena installato pip e Python tramite home-brew su una nuova installazione Mac OS.Pip non riconosce Cython

Prima di tutto, il mio pip non installa affatto le dipendenze - il che mi obbliga a rieseguire "pip install tables" 3 volte e ogni volta mi dirà una dipendenza e lo installerò e poi lo riatterrò di nuovo . È questo comportamento previsto?

In secondo luogo, non accetta l'installazione di Cython che essa stessa installato momento fa:

$ pip show cython 
--- 
Name: Cython 
Version: 0.21 
Location: /usr/local/lib/python2.7/site-packages 
Requires: 

Ma

$ pip install tables 
Downloading/unpacking tables 
    Downloading tables-3.1.1.tar.gz (6.7MB): 6.7MB downloaded 
    Running setup.py (path:/private/var/folders/r_/9cc9_ldj7g35cqnfql52hqt80000gn/T/pip_build_excuvator/tables/setup.py) egg_info for package tables 
    * Using Python 2.7.8 (default, Aug 24 2014, 21:26:19) 
    * Found numpy 1.9.0 package installed. 
    * Found numexpr 2.4 package installed. 
    .. ERROR:: You need Cython 0.13 or greater to compile PyTables! 
    Complete output from command python setup.py egg_info: 
    * Using Python 2.7.8 (default, Aug 24 2014, 21:26:19) 

* Found numpy 1.9.0 package installed. 

* Found numexpr 2.4 package installed. 

.. ERROR:: You need Cython 0.13 or greater to compile PyTables! 
+0

Ho avuto lo stesso problema sul mio box Ubuntu 14.04.1 l'altro giorno. Sembra essere un bug in Cython che è stato risolto ma non è ancora stato rilasciato in una versione: https://github.com/cython/cython/commit/43342ab90704f5f850733544288485048160003d È possibile modificare il sorgente PyTables per ottenere la variabile corretta da Cython – darthbith

+0

Non sono un esperto di Pip, potresti spiegare la procedura in modo un po 'più dettagliato? – FooBar

+1

Ha! L'ho ingannato. Ho installato una versione precedente di Cython, poi le tabelle, quindi ho aggiornato Cython. >) – FooBar

risposta

15

Aggiornamento Cython dalla repo Git monte risolverà il problema.

pip install --upgrade git+git://github.com/cython/[email protected] 
+0

Grazie! Non avrei mai lavorato a questo. – CVertex

+1

Installare pytables da git ha funzionato per me: pip install git + https: //github.com/PyTables/PyTables –

+0

Risposta abbastanza buona! Risolto il mio problema! – pceccon