I want to install zipline
in my Mac OS X Mojave (0.14.2 (18C54)) using Python 3.5.4, but the installation fails every time the compiler tries to install bcolz
through pip install
.
I've already tried to re-install Xcode to the latest version (10.1) and also download the latest Command Line Tools from the official Apple Developer website since the command xcode-select -all is no longer supported. As far as I know the header files in Xcode.app/Contents/Developer/Files
are intact so there's no need to import them from a previous version which I don't have or search them elsewhere over the Internet.
Here is the code from my virtual environment. Typically I would get an error that it cannot locate header files that's why I run it with specifying CFLAGS
(zipline) ~ $CXXFLAGS="-std=libc++" CFLAGS="-std=libc++" pip install zipline
Collecting zipline
Requirement already satisfied: bottleneck>=1.0.0 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (1.0.0)
Requirement already satisfied: Mako>=1.0.1 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (1.0.7)
Requirement already satisfied: sortedcontainers>=1.4.4 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (2.1.0)
Requirement already satisfied: pip>=7.1.0 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (18.1)
Requirement already satisfied: requests-file>=1.4.1 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (1.4.1)
Requirement already satisfied: pandas<=0.22,>=0.18.1 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (0.18.1)
Requirement already satisfied: sqlalchemy>=1.0.8 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (1.2.15)
Requirement already satisfied: Logbook>=0.12.5 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (0.12.5)
Requirement already satisfied: patsy>=0.4.0 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (0.4.0)
Requirement already satisfied: statsmodels>=0.6.1 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (0.6.1)
Requirement already satisfied: six>=1.10.0 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (1.10.0)
Requirement already satisfied: empyrical>=0.5.0 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (0.5.0)
Requirement already satisfied: requests>=2.9.1 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (2.20.1)
Requirement already satisfied: numexpr>=2.6.1 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (2.6.1)
Requirement already satisfied: python-dateutil>=2.4.2 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (2.4.2)
Requirement already satisfied: alembic>=0.7.7 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (1.0.5)
Requirement already satisfied: pandas-datareader>=0.2.1 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (0.2.1)
Collecting bcolz<1,>=0.12.1 (from zipline)
Using cached https://files.pythonhosted.org/packages/6c/8b/1ffa01f872cac36173c5eb95b58c01040d8d25f1b242c48577f4104cd3ab/bcolz-0.12.1.tar.gz
Requirement already satisfied: click>=4.0.0 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (7.0)
Requirement already satisfied: MarkupSafe>=0.23 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (1.1.0)
Requirement already satisfied: cyordereddict>=0.2.2 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (0.2.2)
Requirement already satisfied: setuptools>18.0 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (40.6.3)
Requirement already satisfied: intervaltree>=2.1.0 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (3.0.2)
Requirement already satisfied: lru-dict>=1.1.4 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (1.1.6)
Requirement already satisfied: numpy>=1.11.1 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (1.15.4)
Requirement already satisfied: networkx<2.0,>=1.9.1 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (1.9.1)
Requirement already satisfied: toolz>=0.8.2 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (0.9.0)
Requirement already satisfied: trading-calendars>=1.0.1 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (1.6.1)
Requirement already satisfied: pytz>=2016.4 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (2018.5)
Requirement already satisfied: contextlib2>=0.4.0 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (0.4.0)
Requirement already satisfied: Cython>=0.25.2 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (0.25.2)
Requirement already satisfied: tables>=3.3.0 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (3.4.4)
Requirement already satisfied: decorator>=4.0.0 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (4.0.0)
Requirement already satisfied: scipy>=0.17.1 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (0.17.1)
Requirement already satisfied: multipledispatch>=0.4.8 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from zipline) (0.6.0)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from requests>=2.9.1->zipline) (1.23)
Requirement already satisfied: certifi>=2017.4.17 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from requests>=2.9.1->zipline) (2018.8.24)
Requirement already satisfied: idna<2.8,>=2.5 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from requests>=2.9.1->zipline) (2.7)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from requests>=2.9.1->zipline) (3.0.4)
Requirement already satisfied: python-editor>=0.3 in ./.virtualenvs/zipline/lib/python3.5/site-packages (from alembic>=0.7.7->zipline) (1.0.3)
Building wheels for collected packages: bcolz
Running setup.py bdist_wheel for bcolz ... error
Complete output from command /Users/USERNAME/.virtualenvs/zipline/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/private/var/folders/5k/2m1pt8j91nbfjjjcjvrlxjpc0000gn/T/pip-install-itawco06/bcolz/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/5k/2m1pt8j91nbfjjjcjvrlxjpc0000gn/T/pip-wheel-1f24zwoi --python-tag cp35:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.6-intel-3.5
creating build/lib.macosx-10.6-intel-3.5/bcolz
copying bcolz/py2help_tests.py -> build/lib.macosx-10.6-intel-3.5/bcolz
copying bcolz/version.py -> build/lib.macosx-10.6-intel-3.5/bcolz
copying bcolz/toplevel.py -> build/lib.macosx-10.6-intel-3.5/bcolz
copying bcolz/ctable.py -> build/lib.macosx-10.6-intel-3.5/bcolz
copying bcolz/__init__.py -> build/lib.macosx-10.6-intel-3.5/bcolz
copying bcolz/utils.py -> build/lib.macosx-10.6-intel-3.5/bcolz
copying bcolz/chunked_eval.py -> build/lib.macosx-10.6-intel-3.5/bcolz
copying bcolz/defaults.py -> build/lib.macosx-10.6-intel-3.5/bcolz
copying bcolz/attrs.py -> build/lib.macosx-10.6-intel-3.5/bcolz
copying bcolz/py2help.py -> build/lib.macosx-10.6-intel-3.5/bcolz
copying bcolz/arrayprint.py -> build/lib.macosx-10.6-intel-3.5/bcolz
creating build/lib.macosx-10.6-intel-3.5/bcolz/tests
copying bcolz/tests/test_ndcarray.py -> build/lib.macosx-10.6-intel-3.5/bcolz/tests
copying bcolz/tests/test_carray_objects.py -> build/lib.macosx-10.6-intel-3.5/bcolz/tests
copying bcolz/tests/test_attrs.py -> build/lib.macosx-10.6-intel-3.5/bcolz/tests
copying bcolz/tests/__init__.py -> build/lib.macosx-10.6-intel-3.5/bcolz/tests
copying bcolz/tests/all.py -> build/lib.macosx-10.6-intel-3.5/bcolz/tests
copying bcolz/tests/common.py -> build/lib.macosx-10.6-intel-3.5/bcolz/tests
copying bcolz/tests/test_queries.py -> build/lib.macosx-10.6-intel-3.5/bcolz/tests
copying bcolz/tests/test_ctable.py -> build/lib.macosx-10.6-intel-3.5/bcolz/tests
copying bcolz/tests/test_carray.py -> build/lib.macosx-10.6-intel-3.5/bcolz/tests
copying bcolz/carray_ext.pxd -> build/lib.macosx-10.6-intel-3.5/bcolz
running build_ext
skipping 'bcolz/carray_ext.c' Cython extension (up-to-date)
building 'bcolz.carray_ext' extension
creating build/temp.macosx-10.6-intel-3.5
creating build/temp.macosx-10.6-intel-3.5/bcolz
creating build/temp.macosx-10.6-intel-3.5/c-blosc
creating build/temp.macosx-10.6-intel-3.5/c-blosc/blosc
creating build/temp.macosx-10.6-intel-3.5/c-blosc/internal-complibs
creating build/temp.macosx-10.6-intel-3.5/c-blosc/internal-complibs/lz4-r119
creating build/temp.macosx-10.6-intel-3.5/c-blosc/internal-complibs/snappy-1.1.1
creating build/temp.macosx-10.6-intel-3.5/c-blosc/internal-complibs/zlib-1.2.8
/usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=libc++ -DHAVE_LZ4=1 -DHAVE_SNAPPY=1 -DHAVE_ZLIB=1 -Ibcolz -Ic-blosc/blosc -Ic-blosc/internal-complibs/snappy-1.1.1 -Ic-blosc/internal-complibs/lz4-r119 -Ic-blosc/internal-complibs/zlib-1.2.8 -I/Users/USERNAME/.virtualenvs/zipline/lib/python3.5/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -c bcolz/carray_ext.c -o build/temp.macosx-10.6-intel-3.5/bcolz/carray_ext.o -std=libc++
error: invalid value 'libc++' in '-std=libc++'
note: use 'c89', 'c90', or 'iso9899:1990' for 'ISO C 1990' standard
note: use 'iso9899:199409' for 'ISO C 1990 with amendment 1' standard
note: use 'gnu89' or 'gnu90' for 'ISO C 1990 with GNU extensions' standard
note: use 'c99' or 'iso9899:1999' for 'ISO C 1999' standard
note: use 'gnu99' for 'ISO C 1999 with GNU extensions' standard
note: use 'c11' or 'iso9899:2011' for 'ISO C 2011' standard
note: use 'gnu11' for 'ISO C 2011 with GNU extensions' standard
note: use 'c17' or 'iso9899:2017' for 'ISO C 2017' standard
note: use 'gnu17' for 'ISO C 2017 with GNU extensions' standard
error: command '/usr/bin/clang' failed with exit status 1
----------------------------------------
Failed building wheel for bcolz
Running setup.py clean for bcolz
Failed to build bcolz
Installing collected packages: bcolz, zipline
Running setup.py install for bcolz ... error
Complete output from command /Users/USERNAME/.virtualenvs/zipline/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/private/var/folders/5k/2m1pt8j91nbfjjjcjvrlxjpc0000gn/T/pip-install-itawco06/bcolz/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/5k/2m1pt8j91nbfjjjcjvrlxjpc0000gn/T/pip-record-a3h6zh7b/install-record.txt --single-version-externally-managed --compile --install-headers /Users/USERNAME/.virtualenvs/zipline/bin/../include/site/python3.5/bcolz:
running install
running build
running build_py
creating build
creating build/lib.macosx-10.6-intel-3.5
creating build/lib.macosx-10.6-intel-3.5/bcolz
copying bcolz/py2help_tests.py -> build/lib.macosx-10.6-intel-3.5/bcolz
copying bcolz/version.py -> build/lib.macosx-10.6-intel-3.5/bcolz
copying bcolz/toplevel.py -> build/lib.macosx-10.6-intel-3.5/bcolz
copying bcolz/ctable.py -> build/lib.macosx-10.6-intel-3.5/bcolz
copying bcolz/__init__.py -> build/lib.macosx-10.6-intel-3.5/bcolz
copying bcolz/utils.py -> build/lib.macosx-10.6-intel-3.5/bcolz
copying bcolz/chunked_eval.py -> build/lib.macosx-10.6-intel-3.5/bcolz
copying bcolz/defaults.py -> build/lib.macosx-10.6-intel-3.5/bcolz
copying bcolz/attrs.py -> build/lib.macosx-10.6-intel-3.5/bcolz
copying bcolz/py2help.py -> build/lib.macosx-10.6-intel-3.5/bcolz
copying bcolz/arrayprint.py -> build/lib.macosx-10.6-intel-3.5/bcolz
creating build/lib.macosx-10.6-intel-3.5/bcolz/tests
copying bcolz/tests/test_ndcarray.py -> build/lib.macosx-10.6-intel-3.5/bcolz/tests
copying bcolz/tests/test_carray_objects.py -> build/lib.macosx-10.6-intel-3.5/bcolz/tests
copying bcolz/tests/test_attrs.py -> build/lib.macosx-10.6-intel-3.5/bcolz/tests
copying bcolz/tests/__init__.py -> build/lib.macosx-10.6-intel-3.5/bcolz/tests
copying bcolz/tests/all.py -> build/lib.macosx-10.6-intel-3.5/bcolz/tests
copying bcolz/tests/common.py -> build/lib.macosx-10.6-intel-3.5/bcolz/tests
copying bcolz/tests/test_queries.py -> build/lib.macosx-10.6-intel-3.5/bcolz/tests
copying bcolz/tests/test_ctable.py -> build/lib.macosx-10.6-intel-3.5/bcolz/tests
copying bcolz/tests/test_carray.py -> build/lib.macosx-10.6-intel-3.5/bcolz/tests
copying bcolz/carray_ext.pxd -> build/lib.macosx-10.6-intel-3.5/bcolz
running build_ext
skipping 'bcolz/carray_ext.c' Cython extension (up-to-date)
building 'bcolz.carray_ext' extension
creating build/temp.macosx-10.6-intel-3.5
creating build/temp.macosx-10.6-intel-3.5/bcolz
creating build/temp.macosx-10.6-intel-3.5/c-blosc
creating build/temp.macosx-10.6-intel-3.5/c-blosc/blosc
creating build/temp.macosx-10.6-intel-3.5/c-blosc/internal-complibs
creating build/temp.macosx-10.6-intel-3.5/c-blosc/internal-complibs/lz4-r119
creating build/temp.macosx-10.6-intel-3.5/c-blosc/internal-complibs/snappy-1.1.1
creating build/temp.macosx-10.6-intel-3.5/c-blosc/internal-complibs/zlib-1.2.8
/usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=libc++ -DHAVE_LZ4=1 -DHAVE_SNAPPY=1 -DHAVE_ZLIB=1 -Ibcolz -Ic-blosc/blosc -Ic-blosc/internal-complibs/snappy-1.1.1 -Ic-blosc/internal-complibs/lz4-r119 -Ic-blosc/internal-complibs/zlib-1.2.8 -I/Users/USERNAME/.virtualenvs/zipline/lib/python3.5/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -c bcolz/carray_ext.c -o build/temp.macosx-10.6-intel-3.5/bcolz/carray_ext.o -std=libc++
error: invalid value 'libc++' in '-std=libc++'
note: use 'c89', 'c90', or 'iso9899:1990' for 'ISO C 1990' standard
note: use 'iso9899:199409' for 'ISO C 1990 with amendment 1' standard
note: use 'gnu89' or 'gnu90' for 'ISO C 1990 with GNU extensions' standard
note: use 'c99' or 'iso9899:1999' for 'ISO C 1999' standard
note: use 'gnu99' for 'ISO C 1999 with GNU extensions' standard
note: use 'c11' or 'iso9899:2011' for 'ISO C 2011' standard
note: use 'gnu11' for 'ISO C 2011 with GNU extensions' standard
note: use 'c17' or 'iso9899:2017' for 'ISO C 2017' standard
note: use 'gnu17' for 'ISO C 2017 with GNU extensions' standard
error: command '/usr/bin/clang' failed with exit status 1
----------------------------------------
Command "/Users/USERNAME/.virtualenvs/zipline/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/private/var/folders/5k/2m1pt8j91nbfjjjcjvrlxjpc0000gn/T/pip-install-itawco06/bcolz/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/5k/2m1pt8j91nbfjjjcjvrlxjpc0000gn/T/pip-record-a3h6zh7b/install-record.txt --single-version-externally-managed --compile --install-headers /Users/USERNAME/.virtualenvs/zipline/bin/../include/site/python3.5/bcolz" failed with error code 1 in /private/var/folders/5k/2m1pt8j91nbfjjjcjvrlxjpc0000gn/T/pip-install-itawco06/bcolz/
and the list of packages installed
(zipline) ~ $pip list
Package Version
----------------- ---------
alembic 1.0.5
Bottleneck 1.0.0
ccxt 1.18.110
certifi 2018.8.24
chardet 3.0.4
Click 7.0
contextlib2 0.4.0
cyordereddict 0.2.2
Cython 0.25.2
decorator 4.0.0
empyrical 0.5.0
idna 2.7
intervaltree 3.0.2
Logbook 0.12.5
lru-dict 1.1.6
Mako 1.0.7
MarkupSafe 1.1.0
multipledispatch 0.6.0
networkx 1.9.1
numexpr 2.6.1
numpy 1.15.4
pandas 0.18.1
pandas-datareader 0.2.1
patsy 0.4.0
pip 18.1
python-dateutil 2.4.2
python-editor 1.0.3
pytz 2018.5
requests 2.20.1
requests-file 1.4.1
scipy 0.17.1
setuptools 40.6.3
setuptools-scm 3.1.0
six 1.10.0
sortedcontainers 2.1.0
SQLAlchemy 1.2.15
statsmodels 0.6.1
tables 3.4.4
toolz 0.9.0
trading-calendars 1.6.1
urllib3 1.23
wheel 0.32.3
The optimal outcome would be to get the entire package running since I've been searching the web for over a week and tried every kind of solution on different python versions. Any help would be greatly appreciated.