gpt4 book ai didi

python - 在 Windows 7 中安装 talib 失败

转载 作者:行者123 更新时间:2023-12-01 02:45:01 24 4
gpt4 key购买 nike

我尝试在 Windows 中安装 TALib,但收到此错误:

   common.obj : error LNK2019: unresolved external symbol TA_GetUnstablePeriod referenced in function __pyx_pf_5talib_6common_8_ta_get_unstable_period
build\lib.win-amd64-2.7\talib\common.pyd : fatal error LNK1120: 5 unresolved externals
error: command 'C:\\Users\\felipe.ferminiano\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\link.exe' failed with exit status 1120

----------------------------------------
Command "C:\ProgramData\Anaconda2\python.exe -u -c
"import setuptools, tokenize;
__file__='c:\\users\\felipe~1.fer\\appdata\\local\\temp\\pip-build-kye3ah\\TA-Lib\\setup.py';
f=getattr(tokenize, 'open', open)(__file__);
code=f.read().replace('\r\n', '\n');
f.close();
exec(compile(code, __file__, 'exec'))"
install --record c:\users\felipe~1.fer\appdata\local\temp\pip-al6w47-record\install-record.txt --single-version-externally-managed --compile"
failed with error code 1 in c:\users\felipe~1.fer\appdata\local\temp\pip-build-kye3ah\TA-Lib\

当我运行时:

pip install TA-Lib

我已经安装了适用于 Python 2.7 的 Microsoft Visual C++ 编译器。我该如何解决这个问题?

最佳答案

存储库中的自述文件中提到了该错误:GitHub Repo

Sometimes installation will produce build errors like this:

func.c:256:28: fatal error: ta-lib/ta_libc.h: No such file or directory
compilation terminated.

This typically means that it can't find the underlying TA-Lib library, a dependency which needs to be installed. On Windows, this could be caused by installing the 32-bit binary distribution of the underlying TA-Lib library, but trying to use it with 64-bit Python.

由于您的错误日志包含 amd64,因此 32 位与 64 位问题很可能是您的实际问题。

该库仅以 32 位格式分发(编译/链接日期为 2007 年)

检查问题#11,GitHub - Issue #11有关如何自行编译的提示。

关于python - 在 Windows 7 中安装 talib 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45337509/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com