VeighNa量化社区
你的开源社区量化交易平台
Member
avatar
加入于:
帖子: 5
声望: 0

安装过程中报错怎么办?
Collecting ta-lib
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/7c/56/d1360aabbf9366afdb55b5b3188314c7726adcdc3f417e62e3353801663a/TA-Lib-0.4.25.tar.gz (271 kB)
---------------------------------------- 272.0/272.0 kB 2.4 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy in d:\programdata\python\python39\lib\site-packages (from ta-lib) (1.21.5)
Building wheels for collected packages: ta-lib
Building wheel for ta-lib (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for ta-lib (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [26 lines of output]
<string>:77: UserWarning: Cannot find ta-lib library, installation may fail.
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-39
creating build\lib.win-amd64-cpython-39\talib
copying talib\abstract.py -> build\lib.win-amd64-cpython-39\talib
copying talib\deprecated.py -> build\lib.win-amd64-cpython-39\talib
copying talib\stream.py -> build\lib.win-amd64-cpython-39\talib
copying talib\test_abstract.py -> build\lib.win-amd64-cpython-39\talib
copying talib\test_data.py -> build\lib.win-amd64-cpython-39\talib
copying talib\test_func.py -> build\lib.win-amd64-cpython-39\talib
copying talib\test_pandas.py -> build\lib.win-amd64-cpython-39\talib
copying talib\test_polars.py -> build\lib.win-amd64-cpython-39\talib
copying talib\test_stream.py -> build\lib.win-amd64-cpython-39\talib
copying talib__init__.py -> build\lib.win-amd64-cpython-39\talib
running build_ext
building 'talib._ta_lib' extension
creating build\temp.win-amd64-cpython-39
creating build\temp.win-amd64-cpython-39\Release
creating build\temp.win-amd64-cpython-39\Release\talib
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ic:\ta-lib\c\include -IC:\Users\xuchengshen\AppData\Local\Temp\pip-build-env-f49xjn3b\normal\Lib\site-packages\numpy\core\include -ID:\ProgramData\Python\Python39\include -ID:\ProgramData\Python\Python39\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include" "-ID:\Windows Kits\10\include\10.0.17763.0\ucrt" "-ID:\Windows Kits\10\include\10.0.17763.0\shared" "-ID:\Windows Kits\10\include\10.0.17763.0\um" "-ID:\Windows Kits\10\include\10.0.17763.0\winrt" "-ID:\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tctalib/_ta_lib.c /Fobuild\temp.win-amd64-cpython-39\Release\talib/_ta_lib.obj
_ta_lib.c
talib/_ta_lib.c(745): fatal error C1083: 无法打开包括文件: “ta_libc.h”: No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe' failed with exit code 2
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for ta-lib
Failed to build ta-lib
ERROR: Could not build wheels for ta-lib, which is required to install pyproject.toml-based projects

Member
avatar
加入于:
帖子: 1468
声望: 105

pip install ta-lib==0.4.24 --index=https://pypi.vnpy.com

Member
avatar
加入于:
帖子: 125
声望: 4

没有whl文件,参考 https://www.vnpy.com/forum/topic/250-ti-wen-qian-qing-xian-kan-:vn-pyshi-yong-faq?page=1#pid52023 这篇,有提到

© 2015-2022 上海韦纳软件科技有限公司
备案服务号:沪ICP备18006526号

沪公网安备 31011502017034号

【用户协议】
【隐私政策】
【免责条款】