我一直在尝试在 OSX 10.11.2 上安装 zipline。
pip 安装失败并出现以下错误:
$ pip install zipline
Collecting zipline
Using cached zipline-0.8.3-cp27-none-macosx_10_10_x86_64.whl
Collecting six==1.9.0 (from zipline)
Using cached six-1.9.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): python-dateutil==2.4.2 in /usr/local/lib/python2.7/site-packages (from zipline)
Collecting patsy==0.4.0 (from zipline)
Using cached patsy-0.4.0-py2.py3-none-any.whl
Collecting numexpr==2.4.3 (from zipline)
Using cached numexpr-2.4.3-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Collecting cyordereddict==0.2.2 (from zipline)
Using cached cyordereddict-0.2.2.tar.gz
Collecting bcolz==0.10.0 (from zipline)
Using cached bcolz-0.10.0.tar.gz
Complete output from command python setup.py egg_info:
* Found Cython 0.23.4 package installed.
.. **ERROR:: You need numpy 1.7 or greater to run bcolz!**
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/sj/py2gp2555d15c757mxtpwmn80000gn/T/pip-build-se3cq5/bcolz
我检查了我的 numpy 版本,它是 1.10.2:
$ python
Python 2.7.11 (default, Dec 5 2015, 14:44:53)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.1.76)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.version.version
'1.10.2'
我尝试单独安装 bcolz (并且安装成功),但这并没有解决问题。
$ pip install -I zipline
也没有用。
关于我应该如何安装 zipline 的任何想法?
编辑:我跑了pip install bcolz
,安装的版本是 0.12.1:
/usr/local/lib/python2.7/site-packages/bcolz$ cat version.py
# coding: utf-8
# file generated by setuptools_scm
# don't change, don't track in version control
version = '0.12.1'