When installing TA-Lib I get the following -> ERROR: Command errored out with exit status 1:

When installing TA-Lib I get the following -> ERROR: Command errored out with exit status 1:

我正在尝试安装 TA-Lib,但我尝试的一切都不起作用。我不知道包 wheel 是什么以及为什么错误引用 numpy 但我希望有人能帮助我。

我在用什么:

PS C:\Users\ebben> pip install TA-Lib
Collecting TA-Lib
  Using cached TA-Lib-0.4.19.tar.gz (267 kB)
Requirement already satisfied: numpy in c:\python39\lib\site-packages (from TA-Lib) (1.20.2)
Using legacy 'setup.py install' for TA-Lib, since package 'wheel' is not installed.
Installing collected packages: TA-Lib
    Running setup.py install for TA-Lib ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\ebben\AppData\Local\Temp\pip-install-kj0oo9o5\ta-lib_40a2fa67a4f04799b16fff76025d88fb\setup.py'"'"'; __file__='"'"'C:\Users\ebben\AppData\Local\Temp\pip-install-kj0oo9o5\ta-lib_40a2fa67a4f04799b16fff76025d88fb\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\ebben\AppData\Local\Temp\pip-record-z8tx6fp7\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python39\Include\TA-Lib'
         cwd: C:\Users\ebben\AppData\Local\Temp\pip-install-kj0oo9o5\ta-lib_40a2fa67a4f04799b16fff76025d88fb\
    Complete output (20 lines):
    C:\Users\ebben\AppData\Local\Temp\pip-install-kj0oo9o5\ta-lib_40a2fa67a4f04799b16fff76025d88fb\setup.py:71: UserWarning: Cannot find ta-lib library, installation may fail.
      warnings.warn('Cannot find ta-lib library, installation may fail.')
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.9
    creating build\lib.win-amd64-3.9\talib
    copying talib\abstract.py -> build\lib.win-amd64-3.9\talib
    copying talib\deprecated.py -> build\lib.win-amd64-3.9\talib
    copying talib\stream.py -> build\lib.win-amd64-3.9\talib
    copying talib\test_abstract.py -> build\lib.win-amd64-3.9\talib
    copying talib\test_data.py -> build\lib.win-amd64-3.9\talib
    copying talib\test_func.py -> build\lib.win-amd64-3.9\talib
    copying talib\test_pandas.py -> build\lib.win-amd64-3.9\talib
    copying talib\test_stream.py -> build\lib.win-amd64-3.9\talib
    copying talib\__init__.py -> build\lib.win-amd64-3.9\talib
    running build_ext
    building 'talib._ta_lib' extension
    error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\ebben\AppData\Local\Temp\pip-install-kj0oo9o5\ta-lib_40a2fa67a4f04799b16fff76025d88fb\setup.py'"'"'; __file__='"'"'C:\Users\ebben\AppData\Local\Temp\pip-install-kj0oo9o5\ta-lib_40a2fa67a4f04799b16fff76025d88fb\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\ebben\AppData\Local\Temp\pip-record-z8tx6fp7\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python39\Include\TA-Lib' Check the logs for full command output.

TA-Lib 是一个 C 语言库。您正在尝试为其安装 python 包装器,但在安装过程中找不到 C 库。包装打印:
setup.py:71: UserWarning: Cannot find ta-lib library, installation may fail.
所以,首先,安装 C 库二进制文件,然后安装 python 包装器。在 https://mrjbq7.github.io/ta-lib/install.html

查看依赖项部分