Last active
March 27, 2021 04:13
-
-
Save lookis/87bbd6e8d55a016a0e5436f4ebaa2815 to your computer and use it in GitHub Desktop.
安装 zipline 1.4.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
参考 dockerfile 的安装: | |
使用 python 3.5.10 (需要补丁) | |
brew install openssl bzip2 readline | |
安装 python | |
CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib" | |
pyenv install --patch 3.x.x < <(curl -sSL https://github.com/python/cpython/commit/8ea6353.patch\?full_index\=1) | |
安装zipline所需库依赖 | |
brew install freetype libpng openblas lapack gfortran hdf5 ta-lib c-blosc | |
export LDFLAGS="$LDFLAGS -L/usr/local/opt/lapack/lib -L/usr/local/opt/openblas/lib" | |
export CPPFLAGS="$CPPFLAGS -I/usr/local/opt/openblas/include -I/usr/local/opt/lapack/include" | |
export BLOSC_DIR=/usr/local/Cellar/c-blosc/1.21.0 | |
然后新建virtualenv,安装python依赖 | |
pip install wheel | |
pip install cython | |
pip install 'numpy>=1.11.1,<1.20.0' | |
pip install 'scipy>=0.17.1,<1.5.0' 'pandas>=0.18.1,<1.0.0' TA-Lib matplotlib jupyter zipline | |
在python 3.5.10 版本下已经成功 | |
3.6.13 成功 | |
3.7.9 失败 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment