我正在遵循一个在线教程,需要安装Python和一堆要求,我已经设法安装了它们,但是当我尝试将我的requirements .txt文件安装到我的venv上时,我在TA-Lib上得到了一系列错误和警告。我也安装了c++,但只有在安装这个要求文本时,我才会得到这些错误。
ERROR: Command errored out with exit status 1:
command: 'c:programmingbotscriptspython.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\...\AppData\Local\Temp\pip-install-n7ad74zp\ta-lib_1088777ae08747e18e950c7d1e1c3643\setup.py'"'"'; __file__='"'"'C:\Users\...\AppData\Local\Temp\pip-install-n7ad74zp\ta-lib_1088777ae08747e18e950c7d1e1c3643\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('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:Users...AppDataLocalTemppip-record-us4n0edminstall-record.txt' --single-version-externally-managed --compile --install-headers 'c:programmingbotincludesitepython3.10TA-Lib'
cwd: C:Users...AppDataLocalTemppip-install-n7ad74zpta-lib_1088777ae08747e18e950c7d1e1c3643
Complete output (518 lines):
running install
running build
running build_py
creating build
creating buildlib.win-amd64-3.10
creating buildlib.win-amd64-3.10talib
copying talibabstract.py -> buildlib.win-amd64-3.10talib
copying talibdeprecated.py -> buildlib.win-amd64-3.10talib
copying talibstream.py -> buildlib.win-amd64-3.10talib
copying talibtest_abstract.py -> buildlib.win-amd64-3.10talib
copying talibtest_data.py -> buildlib.win-amd64-3.10talib
copying talibtest_func.py -> buildlib.win-amd64-3.10talib
copying talibtest_pandas.py -> buildlib.win-amd64-3.10talib
copying talibtest_stream.py -> buildlib.win-amd64-3.10talib
copying talib__init__.py -> buildlib.win-amd64-3.10talib
running build_ext
building 'talib._ta_lib' extension
creating buildtemp.win-amd64-3.10
creating buildtemp.win-amd64-3.10Release
creating buildtemp.win-amd64-3.10Releasetalib
C:Program Files (x86)Microsoft Visual Studio2019BuildToolsVCToolsMSVC14.29.30133binHostX86x64cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:ta-libcinclude -Ic:programmingbotlibsite-packagesnumpycoreinclude -Ic:programmingbotinclude -IC:Python310include -IC:Python310Include -IC:Program Files (x86)Microsoft Visual Studio2019BuildToolsVCToolsMSVC14.29.30133include -IC:Program Files (x86)Windows Kits10include10.0.19041.0ucrt -IC:Program Files (x86)Windows Kits10include10.0.19041.0shared -IC:Program Files
(x86)Windows Kits10include10.0.19041.0um -IC:Program Files (x86)Windows Kits10include10.0.19041.0winrt -IC:Program Files (x86)Windows Kits10include10.0.19041.0cppwinrt /Tctalib/_ta_lib.c /Fobuildtemp.win-amd64-3.10Releasetalib/_ta_lib.obj
_ta_lib.c
c:programmingbotlibsite-packagesnumpycoreincludenumpynpy_1_7_deprecated_api.h(14) : Warning Msg: Using deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
talib/_ta_lib.c(6885): warning C4146: unary minus operator applied to unsigned type, result still unsigned
talib/_ta_lib.c(6890): warning C4146: unary minus operator applied to unsigned type, result still unsigned
talib/_ta_lib.c(7080): warning C4146: unary minus operator applied to unsigned type, result still unsigned
talib/_ta_lib.c(7262): warning C4146: unary minus operator applied to unsigned type, result still unsigned
talib/_ta_lib.c(7444): warning C4146: unary minus operator applied to unsigned type, result still unsigned
talib/_ta_lib.c(7449): warning C4146: unary minus operator applied to unsigned type, result still unsigned
talib/_ta_lib.c(7607): warning C4146: unary minus operator applied to unsigned type,
C:Program Files (x86)Microsoft Visual Studio2019BuildToolsVCToolsMSVC14.29.30133binHostX86x64link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:ta-libclib /LIBPATH:c:programmingbotlibs /LIBPATH:C:Python310libs /LIBPATH:C:Python310 /LIBPATH:c:programmingbotPCbuildamd64 /LIBPATH:C:Program Files (x86)Microsoft Visual Studio2019BuildToolsVCToolsMSVC14.29.30133libx64 /LIBPATH:C:Program Files (x86)Windows Kits10lib10.0.19041.0ucrtx64 /LIBPATH:C:Program Files (x86)Windows Kits10lib10.0.19041.0umx64 ta_libc_cdr.lib /EXPORT:PyInit__ta_lib buildtemp.win-amd64-3.10Releasetalib/_ta_lib.obj /OUT:buildlib.win-amd64-3.10talib_ta_lib.cp310-win_amd64.pyd /IMPLIB:buildtemp.win-amd64-3.10Releasetalib_ta_lib.cp310-win_amd64.lib
Creating library buildtemp.win-amd64-3.10Releasetalib_ta_lib.cp310-win_amd64.lib and object buildtemp.win-amd64-3.10Releasetalib_ta_lib.cp310-win_amd64.exp
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLBREAKAWAY_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLEVENINGSTAR
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLSEPARATINGLINES_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLDRAGONFLYDOJI
_ta_lib.obj : error LNK2001: unresolved external symbol TA_SetOptInputParamReal
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLMORNINGDOJISTAR_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_T3_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLSHOOTINGSTAR_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_ADD
_ta_lib.obj : error LNK2001: unresolved external symbol TA_MA_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLKICKING
_ta_lib.obj : error LNK2001: unresolved external symbol TA_MINUS_DM
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDL3WHITESOLDIERS
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLTRISTAR_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_HT_SINE
_ta_lib.obj : error LNK2001: unresolved external symbol TA_MAMA
_ta_lib.obj : error LNK2001: unresolved external symbol TA_VAR
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLSPINNINGTOP_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLUPSIDEGAP2CROWS_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_COSH_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_MININDEX
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLRISEFALL3METHODS
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLPIERCING_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_BOP_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_AROON_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_TRANGE_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLHARAMI
_ta_lib.obj : error LNK2001: unresolved external symbol TA_EXP
_ta_lib.obj : error LNK2001: unresolved external symbol TA_SUB_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_SetUnstablePeriod
_ta_lib.obj : error LNK2001: unresolved external symbol TA_FuncTableAlloc
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLONNECK
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLKICKING_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDL3OUTSIDE
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLDRAGONFLYDOJI_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_WCLPRICE_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_MEDPRICE
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLONNECK_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLLADDERBOTTOM_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_LINEARREG_ANGLE_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_ACOS
_ta_lib.obj : error LNK2001: unresolved external symbol TA_MINMAXINDEX_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_MFI
_ta_lib.obj : error LNK2001: unresolved external symbol TA_MINMAX
_ta_lib.obj : error LNK2001: unresolved external symbol TA_RSI_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_GroupTableFree
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLUPSIDEGAP2CROWS
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLTASUKIGAP
_ta_lib.obj : error LNK2001: unresolved external symbol TA_NATR
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLDOJISTAR
_ta_lib.obj : error LNK2001: unresolved external symbol TA_HT_PHASOR_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_WMA
_ta_lib.obj : error LNK2001: unresolved external symbol TA_Shutdown
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLSHORTLINE_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_GetFuncHandle
_ta_lib.obj : error LNK2001: unresolved external symbol TA_FuncTableFree
_ta_lib.obj : error LNK2001: unresolved external symbol TA_ParamHolderFree
_ta_lib.obj : error LNK2001: unresolved external symbol TA_MAVP
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDL3LINESTRIKE_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLCONCEALBABYSWALL_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_SAR
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLHIGHWAVE_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLMARUBOZU_Lookback
_ta_lib.obj : error LNK2001: unresolved external symbol TA_ADOSC
_ta_lib.obj : error LNK2001: unresolved external symbol TA_CDLMARUBOZU
_ta_lib.obj : error LNK2001: unresolved external symbol TA_SAR_Lookback
buildlib.win-amd64-3.10talib_ta_lib.cp310-win_amd64.pyd : fatal error LNK1120: 339 unresolved externals
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\link.exe' failed with exit code 1120
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:programmingbotscriptspython.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\...\AppData\Local\Temp\pip-install-n7ad74zp\ta-lib_1088777ae08747e18e950c7d1e1c3643\setup.py'"'"'; __file__='"'"'C:\Users\...\AppData\Local\Temp\pip-install-n7ad74zp\ta-lib_1088777ae08747e18e950c7d1e1c3643\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('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:Users...AppDataLocalTemppip-record-us4n0edminstall-record.txt' --single-version-externally-managed --compile --install-headers 'c:programmingbotincludesitepython3.10TA-Lib' Check the logs for full command output
我不得不删除一些错误以适应30000个字符。
通过直接安装从我的下载文件夹做一个pip安装到https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib我的下载在这里的绝对路径修复。然后重新安装了我的需求,现在我没有错误了。