Search code examples
pythonmacosnumpyzipline

pip not able to install zipline on OS X


I have been trying to install zipline on OSX 10.11.2.

The pip install fails with this error:

$ 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

I checked my numpy version, it's 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'

I tried installing bcolz separately (and it installed successfully) but that didn't solve the problem.

$ pip install -I zipline 

didn't work either.

Any ideas about what I should do to install zipline?

EDIT: I ran pip install bcolz and the version installed was 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'

Solution

  • Answering my question in case anyone had the same issue. I ended up installing zipline using Anacaonda instead and it worked out alright. The package changes were:

    The following NEW packages will be INSTALLED:
    
        bcolz:         1.0.0-py27_0     
        click:         6.6-py27_0       
        contextlib2:   0.4.0-py27_0     
        cyordereddict: 0.2.2-py27_0     
        logbook:       0.12.5-py27_0    
        zipline:       0.9.0-np19py27_0 
    
    The following packages will be UPDATED:
    
        bottleneck:    1.0.0-np110py27_0  --> 1.0.0-np19py27_0 
        numba:         0.24.0-np110py27_0 --> 0.24.0-np19py27_0
        patsy:         0.4.0-np110py27_0  --> 0.4.0-np19py27_0 
        scipy:         0.17.0-np110py27_0 --> 0.17.0-np19py27_0
        statsmodels:   0.6.1-np110py27_0  --> 0.6.1-np19py27_0 
    
    The following packages will be DOWNGRADED:
    
        anaconda:      4.0.0-np110py27_0  --> custom-py27_0    
        astropy:       1.1.2-np110py27_0  --> 1.0.4-np19py27_0 
        h5py:          2.5.0-np110py27_4  --> 2.5.0-np19py27_3 
        matplotlib:    1.5.1-np110py27_0  --> 1.4.3-np19py27_3 
        numexpr:       2.5-np110py27_0    --> 2.4.6-np19py27_0 
        numpy:         1.10.4-py27_0      --> 1.9.3-py27_1     
        pandas:        0.18.0-np110py27_0 --> 0.16.2-np19py27_0
        pytables:      3.2.2-np110py27_1  --> 3.2.2-np19py27_0 
        scikit-image:  0.12.3-np110py27_0 --> 0.11.3-np19py27_0
        scikit-learn:  0.17.1-np110py27_0 --> 0.16.1-np19py27_0