2014-09-26 173 views
6

我刚刚在新鲜的Mac OS安装中通过自制啤酒安装了pip和Python。Pip不承认Cython

首先,我的pip并未安装依赖关系 - 这迫使我重新运行'pip install tables'3次,每次它会告诉我一个依赖项,然后我将安装它并重新运行一次。这是预期的行为?

其次,它不接受用Cython的安装,它刚才本身安装:

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

$ 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

我在我的Ubuntu 14.04.1盒子有一天有同样的问题。它似乎是Cython中的一个错误,已经修复但尚未在发行版中提供:https://github.com/cython/cython/commit/43342ab90704f5f850733544288485048160003d您可以编辑PyTables源代码以从Cython获得适当的变量 – darthbith 2014-09-26 23:04:21

+0

我不是Pip的专家,你能否详细解释一下程序? – FooBar 2014-09-27 01:30:45

+1

哈!我欺骗了它。我安装了Cython的旧版本,然后安装了表格,然后更新了Cython。 >) – FooBar 2014-09-27 18:03:55

回答

15

从上游的Git回购升级用Cython将解决此问题。

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

谢谢!我从来没有这样做过。 – CVertex 2014-09-30 03:43:07

+1

从git安装pytables为我工作:pip install git + https://github.com/PyTables/PyTables – 2014-10-08 17:09:52

+0

很不错的答案!解决了我的问题! – pceccon 2014-11-17 15:45:59