[英]How can I install Zipline-trader without errors
我已经尝试按照 zipline-trader 安装页面上的说明安装 zipline-trader: https://zipline-trader.readthedocs.io/en/latest/install.html
在实际运行安装命令之前一切正常。 这些都不起作用:
pip 安装-e。 或 pip 安装 zipline-trader
安装开始,但在开始为 zipline-trader 构建轮子时开始出现问题。
我不是一个巨大的计算机向导,所以如果有人可以在这里帮助我并告诉我问题出在哪里。 将不胜感激。
错误消息如下(很长的列表):
Building wheels for collected packages: bcolz, bottleneck, lru-dict
Building wheel for bcolz (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\matti\Zipline\venv-zipline\Scripts\python.exe' -u -c 'import sys, setuptools,
tokenize; sys.argv[0] = '"'"'C:\\Users\\matti\\AppData\\Local\\Temp\\pip-install-
u0djao1v\\bcolz_ff25721e67224cf19d0fea2b456a1054\\setup.py'"'"';
__file__='"'"'C:\\Users\\matti\\AppData\\Local\\Temp\\pip-install-
u0djao1v\\bcolz_ff25721e67224cf19d0fea2b456a1054\\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 'C:\Users\matti\AppData\Local\Temp\pip-wheel-yk9_l_0r'
cwd: C:\Users\matti\AppData\Local\Temp\pip-install-
u0djao1v\bcolz_ff25721e67224cf19d0fea2b456a1054\
Complete output (42 lines):
SSE2 detected
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\bcolz
copying bcolz\arrayprint.py -> build\lib.win-amd64-3.6\bcolz
copying bcolz\attrs.py -> build\lib.win-amd64-3.6\bcolz
copying bcolz\chunked_eval.py -> build\lib.win-amd64-3.6\bcolz
copying bcolz\ctable.py -> build\lib.win-amd64-3.6\bcolz
copying bcolz\defaults.py -> build\lib.win-amd64-3.6\bcolz
copying bcolz\py2help.py -> build\lib.win-amd64-3.6\bcolz
copying bcolz\py2help_tests.py -> build\lib.win-amd64-3.6\bcolz
copying bcolz\toplevel.py -> build\lib.win-amd64-3.6\bcolz
copying bcolz\utils.py -> build\lib.win-amd64-3.6\bcolz
copying bcolz\version.py -> build\lib.win-amd64-3.6\bcolz
copying bcolz\__init__.py -> build\lib.win-amd64-3.6\bcolz
creating build\lib.win-amd64-3.6\bcolz\tests
copying bcolz\tests\all.py -> build\lib.win-amd64-3.6\bcolz\tests
copying bcolz\tests\common.py -> build\lib.win-amd64-3.6\bcolz\tests
copying bcolz\tests\test_attrs.py -> build\lib.win-amd64-3.6\bcolz\tests
copying bcolz\tests\test_carray.py -> build\lib.win-amd64-3.6\bcolz\tests
copying bcolz\tests\test_carray_objects.py -> build\lib.win-amd64-3.6\bcolz\tests
copying bcolz\tests\test_ctable.py -> build\lib.win-amd64-3.6\bcolz\tests
copying bcolz\tests\test_ndcarray.py -> build\lib.win-amd64-3.6\bcolz\tests
copying bcolz\tests\test_queries.py -> build\lib.win-amd64-3.6\bcolz\tests
copying bcolz\tests\__init__.py -> build\lib.win-amd64-3.6\bcolz\tests
copying bcolz\carray_ext.pxd -> build\lib.win-amd64-3.6\bcolz
running build_ext
skipping 'bcolz\carray_ext.c' Cython extension (up-to-date)
building 'bcolz.carray_ext' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools":
https://visualstudio.microsoft.com/visual-cpp-build-tools/
SSE2 detected
running bdist_wheel
running build
running build_py
copying bcolz\version.py -> build\lib.win-amd64-3.6\bcolz
running build_ext
skipping 'bcolz\carray_ext.c' Cython extension (up-to-date)
building 'bcolz.carray_ext' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools":
https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Failed building wheel for bcolz
Running setup.py clean for bcolz
Building wheel for bottleneck (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\matti\Zipline\venv-zipline\Scripts\python.exe' 'C:\Users\matti\Zipline\venv-
zipline\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel
'C:\Users\matti\AppData\Local\Temp\tmpi6jwni9b'
cwd: C:\Users\matti\AppData\Local\Temp\pip-install-
u0djao1v\bottleneck_4c2f93e8934942d2b56b70de3502ceed
Complete output (51 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\bottleneck
copying bottleneck\_pytesttester.py -> build\lib.win-amd64-3.6\bottleneck
copying bottleneck\_version.py -> build\lib.win-amd64-3.6\bottleneck
copying bottleneck\__init__.py -> build\lib.win-amd64-3.6\bottleneck
creating build\lib.win-amd64-3.6\bottleneck\benchmark
copying bottleneck\benchmark\autotimeit.py -> build\lib.win-amd64-3.6\bottleneck\benchmark
copying bottleneck\benchmark\bench.py -> build\lib.win-amd64-3.6\bottleneck\benchmark
copying bottleneck\benchmark\bench_detailed.py -> build\lib.win-amd64-3.6\bottleneck\benchmark
copying bottleneck\benchmark\__init__.py -> build\lib.win-amd64-3.6\bottleneck\benchmark
creating build\lib.win-amd64-3.6\bottleneck\slow
copying bottleneck\slow\move.py -> build\lib.win-amd64-3.6\bottleneck\slow
copying bottleneck\slow\nonreduce.py -> build\lib.win-amd64-3.6\bottleneck\slow
copying bottleneck\slow\nonreduce_axis.py -> build\lib.win-amd64-3.6\bottleneck\slow
copying bottleneck\slow\reduce.py -> build\lib.win-amd64-3.6\bottleneck\slow
copying bottleneck\slow\__init__.py -> build\lib.win-amd64-3.6\bottleneck\slow
creating build\lib.win-amd64-3.6\bottleneck\src
copying bottleneck\src\bn_config.py -> build\lib.win-amd64-3.6\bottleneck\src
copying bottleneck\src\bn_template.py -> build\lib.win-amd64-3.6\bottleneck\src
copying bottleneck\src\__init__.py -> build\lib.win-amd64-3.6\bottleneck\src
creating build\lib.win-amd64-3.6\bottleneck\tests
copying bottleneck\tests\input_modification_test.py -> build\lib.win-amd64-3.6\bottleneck\tests
copying bottleneck\tests\list_input_test.py -> build\lib.win-amd64-3.6\bottleneck\tests
copying bottleneck\tests\memory_test.py -> build\lib.win-amd64-3.6\bottleneck\tests
copying bottleneck\tests\move_test.py -> build\lib.win-amd64-3.6\bottleneck\tests
copying bottleneck\tests\nonreduce_axis_test.py -> build\lib.win-amd64-3.6\bottleneck\tests
copying bottleneck\tests\nonreduce_test.py -> build\lib.win-amd64-3.6\bottleneck\tests
copying bottleneck\tests\reduce_test.py -> build\lib.win-amd64-3.6\bottleneck\tests
copying bottleneck\tests\scalar_input_test.py -> build\lib.win-amd64-3.6\bottleneck\tests
copying bottleneck\tests\util.py -> build\lib.win-amd64-3.6\bottleneck\tests
copying bottleneck\tests\__init__.py -> build\lib.win-amd64-3.6\bottleneck\tests
UPDATING build\lib.win-amd64-3.6\bottleneck/_version.py
set build\lib.win-amd64-3.6\bottleneck/_version.py to '1.3.2'
running build_ext
running config
compiling '_configtest.c':
int __attribute__((optimize("O3"))) have_attribute_optimize_opt_3(void*);
int main(void)
{
return 0;
}
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools":
https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Failed building wheel for bottleneck
Building wheel for lru-dict (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\matti\Zipline\venv-zipline\Scripts\python.exe' -u -c 'import sys, setuptools,
tokenize; sys.argv[0] = '"'"'C:\\Users\\matti\\AppData\\Local\\Temp\\pip-install-u0djao1v\\lru-
dict_78af74fc04d748028bedabc5a1d6a84d\\setup.py'"'"';
__file__='"'"'C:\\Users\\matti\\AppData\\Local\\Temp\\pip-install-u0djao1v\\lru-
dict_78af74fc04d748028bedabc5a1d6a84d\\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 'C:\Users\matti\AppData\Local\Temp\pip-wheel-qiws589m'
cwd: C:\Users\matti\AppData\Local\Temp\pip-install-u0djao1v\lru-
dict_78af74fc04d748028bedabc5a1d6a84d\
Complete output (5 lines):
running bdist_wheel
running build
running build_ext
building 'lru' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools":
`enter code here`https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Failed building wheel for lru-dict
Running setup.py clean for lru-dict
Failed to build bcolz bottleneck lru-dict
ERROR: Could not build wheels for bottleneck which use PEP 517 and cannot be installed directly
根据我安装 python 软件包的经验,我认为问题很可能是您尝试安装 zipline trader 的 python 环境中已经安装的依赖项和软件包。 我建议使用 python 3.6 版创建一个新的 python 环境并克隆 git 并尝试使用以下两个命令进行安装:
git clone https://github.com/shlomikushchi/zipline-trader.git
然后在您下载 git 的目录中:
pip install -e .
我在 anaconda 环境中执行此操作,它对我有用。
您需要此 package 用于在 anaconda 中克隆 git:
conda install -c anaconda git
您也可以在此处查看说明。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.