Меню

Pip install talib ошибка

@yiugn

I tried to install ta-lib, but only to fail.

How can I solve this problem? Here goes my cmd windows.

C:Usersyiugn_>pip install ta-lib
Collecting ta-lib
Using cached TA-Lib-0.4.10.tar.gz
Building wheels for collected packages: ta-lib
Running setup.py bdist_wheel for ta-lib … error
Complete output from command C:Usersyiugn_Anaconda3python.exe -u -c «import setuptools, tokenize;file=’C:Usersyiugn_AppDataLocalTemppip-build-of4wiq6kta-libsetup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(‘rn’, ‘n’);f.close();exec(compile(code, file, ‘exec’))» bdist_wheel -d C:Usersyiugn_AppDataLocalTemptmpq3fkuotfpip-wheel- —python-tag cp35:
C:Usersyiugn_Anaconda3libsite-packagesCythonDistutilsold_build_ext.py:30: UserWarning: Cython.Distutils.old_build_ext does not properly handle dependencies and is deprecated.
«Cython.Distutils.old_build_ext does not properly handle dependencies «
running bdist_wheel
running build
running build_py
creating build
creating buildlib.win-amd64-3.5
creating buildlib.win-amd64-3.5talib
copying talibdeprecated.py -> buildlib.win-amd64-3.5talib
copying talibtest_abstract.py -> buildlib.win-amd64-3.5talib
copying talibtest_data.py -> buildlib.win-amd64-3.5talib
copying talibtest_func.py -> buildlib.win-amd64-3.5talib
copying talibtest_stream.py -> buildlib.win-amd64-3.5talib
copying talib_init_.py -> buildlib.win-amd64-3.5talib
running build_ext
skipping ‘talibcommon.c’ Cython extension (up-to-date)
building ‘talib.common’ extension
creating buildtemp.win-amd64-3.5
creating buildtemp.win-amd64-3.5Release
creating buildtemp.win-amd64-3.5Releasetalib
C:Program Files (x86)Microsoft Visual Studio 14.0VCBINx86_amd64cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:Usersyiugn_Anaconda3libsite-packagesnumpycoreinclude -Ic:ta-libcinclude -IC:Usersyiugn_Anaconda3include -IC:Usersyiugn_Anaconda3include «-IC:Program Files (x86)Microsoft Visual Studio 14.0VCINCLUDE» «-IC:Program Files (x86)Windows Kits10include10.0.10240.0ucrt» «-IC:Program Files (x86)Windows Kits8.1includeshared» «-IC:Program Files (x86)Windows Kits8.1includeum» «-IC:Program Files (x86)Windows Kits8.1includewinrt» /Tctalibcommon.c /Fobuildtemp.win-amd64-3.5Releasetalibcommon.obj
common.c
C:Program Files (x86)Microsoft Visual Studio 14.0VCBINx86_amd64link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:ta-libclib /LIBPATH:C:Usersyiugn_Anaconda3libs /LIBPATH:C:Usersyiugn_Anaconda3PCbuildamd64 «/LIBPATH:C:Program Files (x86)Microsoft Visual Studio 14.0VCLIBamd64» «/LIBPATH:C:Program Files (x86)Windows Kits10lib10.0.10240.0ucrtx64» «/LIBPATH:C:Program Files (x86)Windows Kits8.1libwinv6.3umx64» ta_libc_cdr.lib /EXPORT:PyInit_common buildtemp.win-amd64-3.5Releasetalibcommon.obj /OUT:buildlib.win-amd64-3.5talibcommon.cp35-win_amd64.pyd /IMPLIB:buildtemp.win-amd64-3.5Releasetalibcommon.cp35-win_amd64.lib
common.obj : warning LNK4197: export ‘PyInit_common’ specified multiple times; using first specification
Creating library buildtemp.win-amd64-3.5Releasetalibcommon.cp35-win_amd64.lib and object buildtemp.win-amd64-3.5Releasetalibcommon.cp35-win_amd64.exp
common.obj : error LNK2001: unresolved external symbol TA_SetUnstablePeriod
common.obj : error LNK2001: unresolved external symbol TA_Shutdown
common.obj : error LNK2001: unresolved external symbol TA_Initialize
common.obj : error LNK2001: unresolved external symbol TA_GetUnstablePeriod
common.obj : error LNK2001: unresolved external symbol TA_GetVersionString
buildlib.win-amd64-3.5talibcommon.cp35-win_amd64.pyd : fatal error LNK1120: 5 unresolved externals
error: command ‘C:Program Files (x86)Microsoft Visual Studio 14.0VCBINx86_amd64link.exe’ failed with exit status 1120


Failed building wheel for ta-lib
Running setup.py clean for ta-lib
Failed to build ta-lib
Installing collected packages: ta-lib
Running setup.py install for ta-lib … error
Complete output from command C:Usersyiugn_Anaconda3python.exe -u -c «import setuptools, tokenize;file=’C:Usersyiugn_AppDataLocalTemppip-build-of4wiq6kta-libsetup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(‘rn’, ‘n’);f.close();exec(compile(code, file, ‘exec’))» install —record C:Usersyiugn_AppDataLocalTemppip-heu3fbw7-recordinstall-record.txt —single-version-externally-managed —compile:
C:Usersyiugn_Anaconda3libsite-packagesCythonDistutilsold_build_ext.py:30: UserWarning: Cython.Distutils.old_build_ext does not properly handle dependencies and is deprecated.
«Cython.Distutils.old_build_ext does not properly handle dependencies «
running install
running build
running build_py
creating build
creating buildlib.win-amd64-3.5
creating buildlib.win-amd64-3.5talib
copying talibdeprecated.py -> buildlib.win-amd64-3.5talib
copying talibtest_abstract.py -> buildlib.win-amd64-3.5talib
copying talibtest_data.py -> buildlib.win-amd64-3.5talib
copying talibtest_func.py -> buildlib.win-amd64-3.5talib
copying talibtest_stream.py -> buildlib.win-amd64-3.5talib
copying talib_init_.py -> buildlib.win-amd64-3.5talib
running build_ext
skipping ‘talibcommon.c’ Cython extension (up-to-date)
building ‘talib.common’ extension
creating buildtemp.win-amd64-3.5
creating buildtemp.win-amd64-3.5Release
creating buildtemp.win-amd64-3.5Releasetalib
C:Program Files (x86)Microsoft Visual Studio 14.0VCBINx86_amd64cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:Usersyiugn_Anaconda3libsite-packagesnumpycoreinclude -Ic:ta-libcinclude -IC:Usersyiugn_Anaconda3include -IC:Usersyiugn_Anaconda3include «-IC:Program Files (x86)Microsoft Visual Studio 14.0VCINCLUDE» «-IC:Program Files (x86)Windows Kits10include10.0.10240.0ucrt» «-IC:Program Files (x86)Windows Kits8.1includeshared» «-IC:Program Files (x86)Windows Kits8.1includeum» «-IC:Program Files (x86)Windows Kits8.1includewinrt» /Tctalibcommon.c /Fobuildtemp.win-amd64-3.5Releasetalibcommon.obj
common.c
C:Program Files (x86)Microsoft Visual Studio 14.0VCBINx86_amd64link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:ta-libclib /LIBPATH:C:Usersyiugn_Anaconda3libs /LIBPATH:C:Usersyiugn_Anaconda3PCbuildamd64 «/LIBPATH:C:Program Files (x86)Microsoft Visual Studio 14.0VCLIBamd64» «/LIBPATH:C:Program Files (x86)Windows Kits10lib10.0.10240.0ucrtx64» «/LIBPATH:C:Program Files (x86)Windows Kits8.1libwinv6.3umx64» ta_libc_cdr.lib /EXPORT:PyInit_common buildtemp.win-amd64-3.5Releasetalibcommon.obj /OUT:buildlib.win-amd64-3.5talibcommon.cp35-win_amd64.pyd /IMPLIB:buildtemp.win-amd64-3.5Releasetalibcommon.cp35-win_amd64.lib
common.obj : warning LNK4197: export ‘PyInit_common’ specified multiple times; using first specification
Creating library buildtemp.win-amd64-3.5Releasetalibcommon.cp35-win_amd64.lib and object buildtemp.win-amd64-3.5Releasetalibcommon.cp35-win_amd64.exp
common.obj : error LNK2001: unresolved external symbol TA_SetUnstablePeriod
common.obj : error LNK2001: unresolved external symbol TA_Shutdown
common.obj : error LNK2001: unresolved external symbol TA_Initialize
common.obj : error LNK2001: unresolved external symbol TA_GetUnstablePeriod
common.obj : error LNK2001: unresolved external symbol TA_GetVersionString
buildlib.win-amd64-3.5talibcommon.cp35-win_amd64.pyd : fatal error LNK1120: 5 unresolved externals
error: command ‘C:Program Files (x86)Microsoft Visual Studio 14.0VCBINx86_amd64link.exe’ failed with exit status 1120

----------------------------------------

Command «C:Usersyiugn_Anaconda3python.exe -u -c «import setuptools, tokenize;file=’C:Usersyiugn_AppDataLocalTemppip-build-of4wiq6kta-libsetup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(‘rn’, ‘n’);f.close();exec(compile(code, file, ‘exec’))» install —record C:Usersyiugn_AppDataLocalTemppip-heu3fbw7-recordinstall-record.txt —single-version-externally-managed —compile» failed with error code 1 in C:Usersyiugn_AppDataLocalTemppip-build-of4wiq6kta-lib

@mrjbq7

Did you install the underlying TA-Lib library like is mentioned in the README?

@mrjbq7

Are you trying to run 64-bit Python with the 32-bit TA-Lib windows library?

@yiugn

  1. I think I followed instruction as noted in the README… Is there anything special in README?
    I just tried to install TA-Lib in cmd window…
    Belows are what I have tried..

pip install TA-Lib
pip install https://github.com/mrjbq7/ta-lib/zipball/master
pip install http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-msvc.zip

None of these worked. Is there anything I missed?

  1. Currently I am working on 64 bit Python with 3.5 version, Windows 10.
    Is there 64 bit TA-Lib windows library? I can’t find 64bit version.
    Where can I find 64 bit version?

Thanks

@yiugn

C:Usersyiugn>pip install ta-lib
Collecting ta-lib
Using cached TA-Lib-0.4.10.tar.gz
Building wheels for collected packages: ta-lib
Running setup.py bdist_wheel for ta-lib … error
Complete output from command C:UsersyiugnAnaconda3python.exe -u -c «import setuptools, tokenize;file=’C:UsersyiugnAppDataLocalTemppip-build-fq2if3tuta-libsetup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(‘rn’, ‘n’);f.close();exec(compile(code, file, ‘exec’))» bdist_wheel -d C:UsersyiugnAppDataLocalTemptmp_eg4jubxpip-wheel- —python-tag cp35:
running bdist_wheel
running build
running build_py
creating build
creating buildlib.win-amd64-3.5
creating buildlib.win-amd64-3.5talib
copying talibdeprecated.py -> buildlib.win-amd64-3.5talib
copying talibtest_abstract.py -> buildlib.win-amd64-3.5talib
copying talibtest_data.py -> buildlib.win-amd64-3.5talib
copying talibtest_func.py -> buildlib.win-amd64-3.5talib
copying talibtest_stream.py -> buildlib.win-amd64-3.5talib
copying talib_init_.py -> buildlib.win-amd64-3.5talib
running build_ext
building ‘talib.common’ extension
creating buildtemp.win-amd64-3.5
creating buildtemp.win-amd64-3.5Release
creating buildtemp.win-amd64-3.5Releasetalib
C:Program Files (x86)Microsoft Visual Studio 14.0VCBINx86_amd64cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:UsersyiugnAnaconda3libsite-packagesnumpycoreinclude -Ic:ta-libcinclude -IC:UsersyiugnAnaconda3include -IC:UsersyiugnAnaconda3include «-IC:Program Files (x86)Microsoft Visual Studio 14.0VCINCLUDE» «-IC:Program Files (x86)Windows Kits10include10.0.10240.0ucrt» «-IC:Program Files (x86)Windows Kits8.1includeshared» «-IC:Program Files (x86)Windows Kits8.1includeum» «-IC:Program Files (x86)Windows Kits8.1includewinrt» /Tctalib/common.c /Fobuildtemp.win-amd64-3.5Releasetalib/common.obj
common.c
C:Program Files (x86)Microsoft Visual Studio 14.0VCBINx86_amd64link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:ta-libclib /LIBPATH:C:UsersyiugnAnaconda3libs /LIBPATH:C:UsersyiugnAnaconda3PCbuildamd64 «/LIBPATH:C:Program Files (x86)Microsoft Visual Studio 14.0VCLIBamd64» «/LIBPATH:C:Program Files (x86)Windows Kits10lib10.0.10240.0ucrtx64» «/LIBPATH:C:Program Files (x86)Windows Kits8.1libwinv6.3umx64» ta_libc_cdr.lib /EXPORT:PyInit_common buildtemp.win-amd64-3.5Releasetalib/common.obj /OUT:buildlib.win-amd64-3.5talibcommon.cp35-win_amd64.pyd /IMPLIB:buildtemp.win-amd64-3.5Releasetalibcommon.cp35-win_amd64.lib
common.obj : warning LNK4197: export ‘PyInit_common’ specified multiple times; using first specification
Creating library buildtemp.win-amd64-3.5Releasetalibcommon.cp35-win_amd64.lib and object buildtemp.win-amd64-3.5Releasetalibcommon.cp35-win_amd64.exp
common.obj : error LNK2001: unresolved external symbol TA_SetUnstablePeriod
common.obj : error LNK2001: unresolved external symbol TA_Shutdown
common.obj : error LNK2001: unresolved external symbol TA_Initialize
common.obj : error LNK2001: unresolved external symbol TA_GetUnstablePeriod
common.obj : error LNK2001: unresolved external symbol TA_GetVersionString
buildlib.win-amd64-3.5talibcommon.cp35-win_amd64.pyd : fatal error LNK1120: 5 unresolved externals
error: command ‘C:Program Files (x86)Microsoft Visual Studio 14.0VCBINx86_amd64link.exe’ failed with exit status 1120


Failed building wheel for ta-lib
Running setup.py clean for ta-lib
Failed to build ta-lib
Installing collected packages: ta-lib
Running setup.py install for ta-lib … error
Complete output from command C:UsersyiugnAnaconda3python.exe -u -c «import setuptools, tokenize;file=’C:UsersyiugnAppDataLocalTemppip-build-fq2if3tuta-libsetup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(‘rn’, ‘n’);f.close();exec(compile(code, file, ‘exec’))» install —record C:UsersyiugnAppDataLocalTemppip-xucc65l0-recordinstall-record.txt —single-version-externally-managed —compile:
running install
running build
running build_py
creating build
creating buildlib.win-amd64-3.5
creating buildlib.win-amd64-3.5talib
copying talibdeprecated.py -> buildlib.win-amd64-3.5talib
copying talibtest_abstract.py -> buildlib.win-amd64-3.5talib
copying talibtest_data.py -> buildlib.win-amd64-3.5talib
copying talibtest_func.py -> buildlib.win-amd64-3.5talib
copying talibtest_stream.py -> buildlib.win-amd64-3.5talib
copying talib_init_.py -> buildlib.win-amd64-3.5talib
running build_ext
building ‘talib.common’ extension
creating buildtemp.win-amd64-3.5
creating buildtemp.win-amd64-3.5Release
creating buildtemp.win-amd64-3.5Releasetalib
C:Program Files (x86)Microsoft Visual Studio 14.0VCBINx86_amd64cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:UsersyiugnAnaconda3libsite-packagesnumpycoreinclude -Ic:ta-libcinclude -IC:UsersyiugnAnaconda3include -IC:UsersyiugnAnaconda3include «-IC:Program Files (x86)Microsoft Visual Studio 14.0VCINCLUDE» «-IC:Program Files (x86)Windows Kits10include10.0.10240.0ucrt» «-IC:Program Files (x86)Windows Kits8.1includeshared» «-IC:Program Files (x86)Windows Kits8.1includeum» «-IC:Program Files (x86)Windows Kits8.1includewinrt» /Tctalib/common.c /Fobuildtemp.win-amd64-3.5Releasetalib/common.obj
common.c
C:Program Files (x86)Microsoft Visual Studio 14.0VCBINx86_amd64link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:ta-libclib /LIBPATH:C:UsersyiugnAnaconda3libs /LIBPATH:C:UsersyiugnAnaconda3PCbuildamd64 «/LIBPATH:C:Program Files (x86)Microsoft Visual Studio 14.0VCLIBamd64» «/LIBPATH:C:Program Files (x86)Windows Kits10lib10.0.10240.0ucrtx64» «/LIBPATH:C:Program Files (x86)Windows Kits8.1libwinv6.3umx64» ta_libc_cdr.lib /EXPORT:PyInit_common buildtemp.win-amd64-3.5Releasetalib/common.obj /OUT:buildlib.win-amd64-3.5talibcommon.cp35-win_amd64.pyd /IMPLIB:buildtemp.win-amd64-3.5Releasetalibcommon.cp35-win_amd64.lib
common.obj : warning LNK4197: export ‘PyInit_common’ specified multiple times; using first specification
Creating library buildtemp.win-amd64-3.5Releasetalibcommon.cp35-win_amd64.lib and object buildtemp.win-amd64-3.5Releasetalibcommon.cp35-win_amd64.exp
common.obj : error LNK2001: unresolved external symbol TA_SetUnstablePeriod
common.obj : error LNK2001: unresolved external symbol TA_Shutdown
common.obj : error LNK2001: unresolved external symbol TA_Initialize
common.obj : error LNK2001: unresolved external symbol TA_GetUnstablePeriod
common.obj : error LNK2001: unresolved external symbol TA_GetVersionString
buildlib.win-amd64-3.5talibcommon.cp35-win_amd64.pyd : fatal error LNK1120: 5 unresolved externals
error: command ‘C:Program Files (x86)Microsoft Visual Studio 14.0VCBINx86_amd64link.exe’ failed with exit status 1120

----------------------------------------

Command «C:UsersyiugnAnaconda3python.exe -u -c «import setuptools, tokenize;file=’C:UsersyiugnAppDataLocalTemppip-build-fq2if3tuta-libsetup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(‘rn’, ‘n’);f.close();exec(compile(code, file, ‘exec’))» install —record C:UsersyiugnAppDataLocalTemppip-xucc65l0-recordinstall-record.txt —single-version-externally-managed —compile» failed with error code 1 in C:UsersyiugnAppDataLocalTemppip-build-fq2if3tuta-lib

@mrjbq7

The problem is very likely trying to run 64-bit Python with 32-bit TA-Lib. Unfortunately, they only distribute binaries built for 32-bit Windows. You can, however, build your own 64-bit TA-Lib from source. There is some discussion about doing that on this bug:

#11

If you do get it to work, it would be great if you could provide a list of instructions so I can add them to the README.

@kristofmoens

I had a similar problem when trying to compile it, I tried to recreate the structure by using CMake. You can find the repository at https://github.com/kristofmoens/ta-lib

Compiling can be done by:
cd c
cmake -G «Visual Studio 14 2015 Win64» src
msbuild ALL_BUILD.vcxproj

That should generate the needed ta_lib.lib file.

@MountainCountry

I’m unable to install TA-Lib as well,
Have done the following:
-created c:ta-lib folder and have the following in the folder:
1 TA_Lib-0.4.10-cp36-cp36-win_amd64
2 ta-lib-0.4.0.0(2).jar
3 ta-lib-0.4.0-1.i386.rpm
4 TA-Lib-0.4.10.tar.gz

Have tried to do a pip install TA-Lib form cmd.exe-no dice
Have tried to do a python setup.py install- no luck

Currently running Python 3.5.2 on Windows 10

Keep getting the dreaded «Failed building wheel for TA-Lib» & «cannot open include file:»ta_libc.h’: No such file or directory» along with the «»Microsoft Visual Studio 14.0VCBinx86_amd64c1.exe.» failed with exit status 2″

@mrjbq7

Hi @MountainCountry,

I’m sorry you’re having problems. Your main problem is likely to be trying to use 64-bit Python with the 32-bit binary release of the ta-lib C library.

Quoting from the README:

Download ta-lib-0.4.0-msvc.zip and unzip to C:ta-lib

This is a 32-bit release. If you want to use 64-bit Python, you will need to build a 64-bit version > > of the library.

So, if you want to use 32-bit Python, you can follow the instructions to «Download ta-lib-0.4.0-msvc.zip and unzip to C:ta-lib». You will know you did it correctly if you have C:ta-libcinclude and C:ta-libclib directories.

If you want to use 64-bit Python, you will need to build the underlying ta-lib C library yourself or find someone that has already done that for you. You can find discussion and instructions on different bug reports, for example #11 or #127 (comment).

@mrjbq7

P.S., anyone want to write up and contribute clean «build 64-bit windows binaries of ta-lib C library»? It would be very appreciated since this issue seems to come up a lot (as most Windows users are on 64-bit now). We could put it in the README

@stevens-tech

Here are my instructions to build the 64-bit ta-lib.

Install TA-Lib C Library on Windows 10

  1. Download and Unzip ta-lib-0.4.0-msvc.zip
  2. Move the Unzipped Folder ta-lib to C:
  3. Download and Install Visual Studio Community 2015
    • Remember to Select [Visual C++] Feature
  4. Build TA-Lib Library
    • From Windows Start Menu, Start [VS2015 x64 Native Tools Command Prompt]
    • Move to C:ta-libcmakecdrwin32msvc
    • Build the Library nmake
  5. Then pip3 install ta-lib
jsaperas, pwojcikdev, r1proto, hawkinggg, chungnguyenfit, DKMudrechenko, leehanchung, ferankliu, AUK1939, oalexandere, and 70 more reacted with thumbs up emoji
Keeqler, hansfriese, kitaev-chen, barakavisar, ehsan1384, eialanjones, uncttao, and siru409 reacted with laugh emoji
miberxx, justttry, jad21, StrikerRUS, BlancHeart, misteriusdrh, Noahinn, TheodoreKrypton, lunluen, kitaev-chen, and 7 more reacted with hooray emoji
bastulli, TheTheorist, mdalvi, NewWheat, jpvm, JaysonAlbert, justttry, BigYuyo, BlancHeart, misteriusdrh, and 13 more reacted with heart emoji
eialanjones, Shamnad-s, uncttao, viv1codes, and siru409 reacted with rocket emoji

@thecfguy

Here is what works for me…
Download TA_Lib-0.4.10-cp27-cp27m-win_amd64.whl from http://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib.
And use command
pip install TA_Lib-0.4.10-cp27-cp27m-win_amd64.whl

I was using Conda4 with python 3.6 64 bit version.

Bennnyy, bhavsarpratik, jam-lock, zdco, SeverX, valaton, stanwanghk, shaobo76, DiiaanaD, leowei0129, and 68 more reacted with thumbs up emoji
manubauer reacted with thumbs down emoji
Bennnyy, SeverX, valaton, thom1337, khbalhandawi, nareddyt, JamesFarrant, jeff-hernandez, kickbox, lydnguyen, and 11 more reacted with laugh emoji
JamesFarrant, jeff-hernandez, apovall, mostprogrammer, Noahinn, jsabhishek, tlhpsound, Uxamailyax, wahidanvary, and nameless0704 reacted with hooray emoji
Uxamailyax, Sinansi, wahidanvary, RobDBob, and nameless0704 reacted with heart emoji
jsabhishek, iml-v, Cogax, tlhpsound, Uxamailyax, redLeR1st, wahidanvary, and nameless0704 reacted with rocket emoji

@KabeerSinghBedi

CDLLONGLINE is predicting wrong candle stick as Longline. Multiple times the same issue is happening so can u help me out with this.@mrjbq7

@mrjbq7

Hi @KabeerSinghBedi, if you have a particular example where you think the output is wrong, feel free to open an issue with the sample data and maybe I can help. There are a few things I would say, though:

  1. This is just a lightweight wrapper for the TA-Lib C library (http://ta-lib.org) which is where a bug in the logic should probably be fixed/addressed.

  2. The TA-Lib C library has some candlestick settings that might control how the candlestick implementation determines which outputs to make. I made a commit recently that allows you to set them in d25e9df.

  3. The code for CDLLONGLINE is here https://sourceforge.net/p/ta-lib/code/HEAD/tree/trunk/ta-lib/c/src/ta_func/ta_CDLLONGLINE.c and you can read through the logic which is fairly short so it should be easy to troubleshoot. I note the following comment from the code:

    The meaning of «long» and «short» is specified with TA_SetCandleSettings
    outInteger is positive (1 to 100) when white (bullish), negative (-1 to -100) when black (bearish)

    And the TA_CANDLECOLOR function that it uses is from this define:

    #define TA_CANDLECOLOR(IDX)     ( inClose[IDX] >= inOpen[IDX] ? 1 : -1 )

This issue is for installation issues on 64-bit Windows, so please continue this discussion on a new issue, thanks!

@afnhsn

@quaid281

I have tried everything on this page with no luck. A Youtube tutorial would be clutch at this point

@mrjbq7

@quaid281 I’m sorry it’s not working for you.

Windows is the biggest source of problems because most people don’t have C compilers and expect to be able to install binaries.

Well, the underlying TA-Lib windows binary is only 32-bit. So it works if you use 32-bit python, but if you want 64-bit python, then you need to build the underlying TA-Lib yourself.

#127 (comment)

If building this python ta-lib wrapper is hard, then you can use the unofficial binaries made available here:

#127 (comment)

Generally, it should be pretty easy to pip3 install ta-lib. And it is on macOS and Linux. Unfortunately, Windows makes it a little complex.

@masdeseiscaracteres

@quaid281 I have just compiled the TA-lib library for Windows 64 bit and created Python wheels for both Python 3.5 & 3.6. I’ve uploaded it to

Now, installing should be as simple as:

pip install -i https://pypi.anaconda.org/masdeseiscaracteres/simple ta-lib

I haven’t tested it thoroughly yet. Let me know if it works…

karthikeyann, dartpain, JuanLozadaM, mosemet, kenmaready, cooltechie007, sem9proj, jimportico, usgoose, santiagocasas, and 10 more reacted with thumbs up emoji
JuanLozadaM, mmngreco, sem9proj, tkifelew, takkyi83, and Infernolia reacted with laugh emoji
mayankrasu, karthikeyann, JuanLozadaM, kenmaready, bsegot, sem9proj, iml-v, tkifelew, takkyi83, Infernolia, and ibeakanmaj reacted with hooray emoji
gp-slick-coder, JuanLozadaM, kenmaready, sem9proj, usgoose, santiagocasas, iml-v, prabuinet, tkifelew, takkyi83, and 2 more reacted with heart emoji

@quaid281

Collecting ta-lib
Downloading https://pypi.anaconda.org/masdeseiscaracteres/simple/ta-lib/0.4.17/TA_Lib-0.4.17-cp36-cp36m-win_amd64.whl (539kB)
100% |████████████████████████████████| 542kB 606kB/s
Requirement already satisfied: numpy in c:usersuzianaconda3libsite-packages (from ta-lib)
Installing collected packages: ta-lib
Successfully installed ta-lib-0.4.17
You are using pip version 9.0.3, however version 10.0.1 is available.
You should consider upgrading via the ‘python -m pip install —upgrade pip’ command.

hmm. okay, seems to have worked. I will try it this weekend

@mayankrasu

@mayankrasu

@stevens-tech at the nmake step I get the error:
‘cl’ is not recognized as an internal or external command
Appreciate if someone can help me get around this.

@karifann

@masdeseiscaracteres thanks for input. Didn’t work for me, however. Tried for Python 3.5 and 3.6 (conda) same issue : Could not find a version that satisfies the requirement ta-lib … No matching distribution found for ta-lib.
I also tried install similar wheels from https://www.lfd.uci.edu/~gohlke/pythonlibs/ — similar issue: … is not a supported wheel on this platform.
I know my python is 64 bit and I have installed numpy
:((

@karifann

Seems I found the problem. My initial anaconda setup was python 2.7 64bit. I made additional environment 3.6 for tensorflow. I activated 3.6 evn and when trying to pip the build from https://www.lfd.uci.edu/~gohlke/pythonlibs/ or the build from masdeseiscaracteres it gave me that error (see higher). Conda somehow considered me using base python 2.7 I think. Then I opened cmd prompt -> went to my 3.6 environment script folder and tried to pip from there. And it worked 🙂

@kenmaready

Thank you @masdeseiscaracteres! Nothing else worked for me, but your wheels worked great. Thank you.

@TheCabe

@usgoose

I was getting the errors below, but then I tried #127 (comment) and it worked, thank you @masdeseiscaracteres.

Environment:

conda version : 4.6.1
conda-build version : 3.17.6
python version : 3.6.5.final.0

Output:

(base) C:UsersXYZ>conda install -c quantopian ta-lib
Collecting package metadata: done
Solving environment: done

## Package Plan ##

  environment location: C:UsersXYZAnaconda3

  added / updated specs:
    - ta-lib


The following NEW packages will be INSTALLED:

  certifi            pkgs/main/win-64::certifi-2018.8.24-py35_1
  pip                pkgs/main/win-64::pip-10.0.1-py35_0
  setuptools         pkgs/main/win-64::setuptools-40.2.0-py35_0
  ta-lib             quantopian/win-64::ta-lib-0.4.9-np114py35_0
  zstd               pkgs/main/win-64::zstd-1.3.7-h508b16e_0

The following packages will be UPDATED:

  ca-certificates                              2018.03.07-0 --> 2018.12.5-0
  libarchive                               3.3.2-h798a506_7 --> 3.3.3-h0643e63_5
  libpng                                  1.6.34-h79bbb47_0 --> 1.6.36-h2a8f88b_0
  openssl                                 1.0.2o-h8ea7d77_0 --> 1.1.1a-he774522_0
  qt                                   5.9.5-vc14he4a7d60_0 --> 5.9.7-vc14h73c81de_0
  sqlite                                  3.23.1-h35aae40_0 --> 3.26.0-he774522_0
  vc                                          14-h0510ff6_3 --> 14.1-h0510ff6_4
  vs2015_runtime                               14.0.25123-3 --> 14.15.26706-h3a45250_0

The following packages will be DOWNGRADED:

  libssh2                                  1.8.0-hd619d38_4 --> 1.8.0-h7a1dbc1_4
  numpy                               1.14.3-py36h9fa60d3_1 --> 1.14.2-py35h5c71026_0
  python                                   3.6.5-h0c2934d_0 --> 3.5.6-he025d50_0
  wheel                                       0.31.1-py36_0 --> 0.31.1-py35_0
  wincertstore                           0.2-py36h7fe50ca_0 --> 0.2-py35hfebbdb8_0


Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: failed

RemoveError: 'requests' is a dependency of conda and cannot be removed from
conda's operating environment.
RemoveError: 'setuptools' is a dependency of conda and cannot be removed from
conda's operating environment.
(base) C:UsersXYZ>pip install TA_Lib-0.4.17-cp27-cp27m-win_amd64.whl
TA_Lib-0.4.17-cp27-cp27m-win_amd64.whl is not a supported wheel on this platform.
You are using pip version 9.0.1, however version 19.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

@Jens1989

Here is what works for me…
Download TA_Lib-0.4.10-cp27-cp27m-win_amd64.whl from http://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib.
And use command
pip install TA_Lib-0.4.10-cp27-cp27m-win_amd64.whl

I was using Conda4 with python 3.6 64 bit version.

I have the following problem when I try it:

ERROR: Invalid requirement: ‘TA_Lib-0.4.17-cp37-cp37m-win_amd64.’

@mrjbq7

@Jens1989 if you want to use it with Python 3.6, you probably want the ...-cp36-cp36m-... version…

@Jens1989

thanks, I finally got it working. I had an issue with the environment variables which didn’t have the path to the correct python version so that’s why it wasn’t recognized. thanks for your help!

@jorgecolonconsulting

Try installing ta-lib first with your package manager (Brew, MacPorts, etc) before you run pip install ta-lib. Looks like it needs C source code for ta-lib or the libraries it produces.

@zoakes

I’ve been stuck on this since the Catalina update — does anyone know how to resolve for iOS? I had trouble the first time, but got it with brew, I’ve tried every command I can find for iOS and nothing. This damn wheel will not build — whatever that means.

@mrjbq7

Are you using iOS or macOS?

Are you saying brew install ta-lib doesn’t work?

Or that after that, pip install ta-lib doesn’t work?

On Oct 31, 2019, at 4:34 PM, Zach Mazz ***@***.***> wrote:


I’ve been stuck on this since the Catalina update — does anyone know how to resolve for iOS? I had trouble the first time, but got it with brew, I’ve tried every command I can find for iOS and nothing. This damn wheel will not build — whatever that means.


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or unsubscribe.

@zoakes

Mac OSx Catalina 10.15.

Brew install ta-lib runs, but when I import talib in ipynb it’s throwing no module named ’talib’

Pip install does not work, (error building wheel, error with ‘gcc’ — the cpp compiler I imagine)
I don’t think pip install ta-lib ever worked for me, but before Catalina update, my Talib with Brew worked fine in use.

—————————————————————————
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-158-bd64a27f98dc> in <module>
2 import numpy as np
3 import matplotlib.pyplot as plt
—-> 4 import talib
5
6 aapl = pdr.DataReader(‘aapl’,’yahoo’,’2015′)

ModuleNotFoundError: No module named ‘talib’

On Oct 31, 2019, at 6:56 PM, John Benediktsson <notifications@github.com<mailto:notifications@github.com>> wrote:

Are you using iOS or macOS?

Are you saying brew install ta-lib doesn’t work?

Or that after that, pip install ta-lib doesn’t work?

On Oct 31, 2019, at 4:34 PM, Zach Mazz ***@***.******@***.***>> wrote:


I’ve been stuck on this since the Catalina update — does anyone know how to resolve for iOS? I had trouble the first time, but got it with brew, I’ve tried every command I can find for iOS and nothing. This damn wheel will not build — whatever that means.


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or unsubscribe.

@ehsan1384

Thanks , worked very well 🙂

@kelvinu

conda install -c quantopian ta-lib=0.4.9

@kwokmoonho

  1. check your python version in terminal: python -V
  2. the default spyder python version is 3.7, so u may want to low it down to 3.5
    conda create -n py35 python=3.5 anaconda
  3. then you need to switch your version to python 3.5 by:
    Window: activate py35
    MAC: conda activate py35
  4. then you can use the following command to install ta-lib:
    conda install -c quantopian ta-lib
  5. when you open your conda, remember to switch to a suitable python version before you launch your spyder.

@soumen29dec

I know i am quite late in working on TA-Lib and also realized it is really difficult to install in windows 64-bit. but i strongly suggest to watch this short YouTube video and you get the library through simple steps. Umesh has wonderfully shown each step quite easily and understanably
https://www.youtube.com/watch?v=VJyNArEU0ws

@mrjbq7

If anyone wants to help contribute to a wheel package that’s easier to
install on windows, and includes the TA-Lib underlying C library, that
would be awesome.

@giuliaserafini

@lightmate

  1. I think I followed instruction as noted in the README… Is there anything special in README?
    I just tried to install TA-Lib in cmd window…
    Belows are what I have tried..

pip install TA-Lib
pip install https://github.com/mrjbq7/ta-lib/zipball/master
pip install http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-msvc.zip

None of these worked. Is there anything I missed?

  1. Currently I am working on 64 bit Python with 3.5 version, Windows 10.
    Is there 64 bit TA-Lib windows library? I can’t find 64bit version.
    Where can I find 64 bit version?

Thanks

[Windows 10, 64 bit, Anaconda ]I am using windows 10 64bit and when I tried to install ta-lib faced similar issues however this youtube video([https://www.youtube.com/watch?v=VJyNArEU0ws&ab_channel=QuantAlpha]) solved all of my issues and I am using ta-lib in my anaconda environment just fine.
hope this helps

@Marl27

Maybe it’s too late to answer but someone might always be struggling with TA-Lib.
Since I am using Python3.9, I downloaded the TA_Lib-0.4.19-cp39-cp39-win_amd64.whl in the project folder and used ‘pip install TA_Lib-0.4.19-cp39-cp39-win_amd64.whl’ and it worked.

@avangardistic

it can`t be installed on Google Colab
!pip install TA-Lib

Collecting TA-Lib
Using cached https://files.pythonhosted.org/packages/ac/cf/681911aa31e04ba171ab4d523a412f4a746e30d3eacb1738799d181e028b/TA-Lib-0.4.19.tar.gz
Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (from TA-Lib) (1.19.5)
Building wheels for collected packages: TA-Lib
Building wheel for TA-Lib (setup.py) … error
ERROR: Failed building wheel for TA-Lib
Running setup.py clean for TA-Lib
Failed to build TA-Lib
Installing collected packages: TA-Lib
Running setup.py install for TA-Lib … error
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘»‘»‘/tmp/pip-install-yj3x6xmj/TA-Lib/setup.py'»‘»‘; file='»‘»‘/tmp/pip-install-yj3x6xmj/TA-Lib/setup.py'»‘»‘;f=getattr(tokenize, ‘»‘»‘open'»‘»‘, open)(file);code=f.read().replace(‘»‘»‘rn'»‘»‘, ‘»‘»‘n'»‘»‘);f.close();exec(compile(code, file, ‘»‘»‘exec'»‘»‘))’ install —record /tmp/pip-record-rngzj859/install-record.txt —single-version-externally-managed —compile Check the logs for full command output.

@mannyinwang

I tried to install it in ubuntu but I am getting the error below

Building wheel for ta-lib (setup.py) … error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘»‘»‘/tmp/pip-install-8lvvui4u/ta-lib/setup.py'»‘»‘; file='»‘»‘/tmp/pip-install-8lvvui4u/ta-lib/setup.py'»‘»‘;f=getattr(tokenize, ‘»‘»‘open'»‘»‘, open)(file);code=f.read().replace(‘»‘»‘rn'»‘»‘, ‘»‘»‘n'»‘»‘);f.close();exec(compile(code, file, ‘»‘»‘exec'»‘»‘))’ bdist_wheel -d /tmp/pip-wheel-1yzigke3
cwd: /tmp/pip-install-8lvvui4u/ta-lib/

Ran these commands:

  • untar tar -xvf ta-lib-0.4.0-src.tar.gz
  • cd /../ta-lib
  • ./configure —prefix=/usr
  • make
  • sudo make install
  • sudo apt upgrade
  • pip install ta-lib or pip install TA-Lib

Has someone been able to successfully install in Ubuntu

@yesdeepakmittal

@BalajiAmbachi

@quaid281 I have just compiled the TA-lib library for Windows 64 bit and created Python wheels for both Python 3.5 & 3.6. I’ve uploaded it to

Now, installing should be as simple as:

pip install -i https://pypi.anaconda.org/masdeseiscaracteres/simple ta-lib

I haven’t tested it thoroughly yet. Let me know if it works…

@masdeseiscaracteres — I tried installing in my anaconda prompt. Python 3.9, windows 64
But i got the below error message
ERROR: Could not find a version that satisfies the requirement ta-lib

ERROR: No matching distribution found for ta-lib

@SmartManoj

pip install pipwin
pipwin install TA-Lib

@mrjbq7

If you are using Python 3.6, why install the cp27 (Python 2.7) wheel?

On Oct 7, 2021, at 3:17 AM, மனோஜ்குமார் பழனிச்சாமி ***@***.***> wrote:


Here is what works for me… Download TA_Lib-0.4.10-cp27-cp27m-win_amd64.whl from http://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib. And use command pip install TA_Lib-0.4.10-cp27-cp27m-win_amd64.whl

I was using Conda4 with python 3.6 64 bit version.
pip install pipwin pipwin install TA-Lib


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

@Amiransari92

Here is what works for me… Download TA_Lib-0.4.10-cp27-cp27m-win_amd64.whl from http://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib. And use command pip install TA_Lib-0.4.10-cp27-cp27m-win_amd64.whl

I was using Conda4 with python 3.6 64 bit version.

worked with python 3.8 64 bit windows10 also. Just download respective file from the given link, and cd to downloaded dir and run pip install installedFile

@sskohli01

Try installing ta-lib first with your package manager (Brew, MacPorts, etc) before you run pip install ta-lib. Looks like it needs C source code for ta-lib or the libraries it produces.

this worked for me on mac intel m1, i had to also install numpy first

Всем привет!

Пытаюсь поставить библиотеку ta-lib для python в 16.04(х64), но получаю ошибку:

pip install ta-lib
Collecting ta-lib
  Using cached https://files.pythonhosted.org/packages/90/05/d4c6a778d7a7de0be366bc4a850b4ffaeac2abad927f95fa8ba6f355a082/TA-Lib-0.4.17.tar.gz
Requirement already satisfied: numpy in ./.local/lib/python2.7/site-packages (from ta-lib) (1.15.0)
Building wheels for collected packages: ta-lib
  Running setup.py bdist_wheel for ta-lib ... error
  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-p7nQVn/ta-lib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-Qr_dyn --python-tag cp27:
  /tmp/pip-install-p7nQVn/ta-lib/setup.py:79: UserWarning: Cannot find ta-lib library, installation may fail.
    warnings.warn('Cannot find ta-lib library, installation may fail.')
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-2.7
  creating build/lib.linux-x86_64-2.7/talib
  copying talib/abstract.py -> build/lib.linux-x86_64-2.7/talib
  copying talib/stream.py -> build/lib.linux-x86_64-2.7/talib
  copying talib/test_pandas.py -> build/lib.linux-x86_64-2.7/talib
  copying talib/__init__.py -> build/lib.linux-x86_64-2.7/talib
  copying talib/deprecated.py -> build/lib.linux-x86_64-2.7/talib
  copying talib/test_stream.py -> build/lib.linux-x86_64-2.7/talib
  copying talib/test_data.py -> build/lib.linux-x86_64-2.7/talib
  copying talib/test_func.py -> build/lib.linux-x86_64-2.7/talib
  copying talib/test_abstract.py -> build/lib.linux-x86_64-2.7/talib
  running build_ext
  building 'talib._ta_lib' extension
  creating build/temp.linux-x86_64-2.7
  creating build/temp.linux-x86_64-2.7/talib
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/home/sergey/.local/lib/python2.7/site-packages/numpy/core/include -I/usr/include -I/usr/local/include -I/opt/include -I/opt/local/include -I/usr/include/python2.7 -c talib/_ta_lib.c -o build/temp.linux-x86_64-2.7/talib/_ta_lib.o
  talib/_ta_lib.c:526:28: fatal error: ta-lib/ta_defs.h: Нет такого файла или каталога
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    ----------------------------------------
  Failed building wheel for ta-lib
  Running setup.py clean for ta-lib
Failed to build ta-lib
Installing collected packages: ta-lib
  Running setup.py install for ta-lib ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-p7nQVn/ta-lib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-c0xvW3/install-record.txt --single-version-externally-managed --compile:
    /tmp/pip-install-p7nQVn/ta-lib/setup.py:79: 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.linux-x86_64-2.7
    creating build/lib.linux-x86_64-2.7/talib
    copying talib/abstract.py -> build/lib.linux-x86_64-2.7/talib
    copying talib/stream.py -> build/lib.linux-x86_64-2.7/talib
    copying talib/test_pandas.py -> build/lib.linux-x86_64-2.7/talib
    copying talib/__init__.py -> build/lib.linux-x86_64-2.7/talib
    copying talib/deprecated.py -> build/lib.linux-x86_64-2.7/talib
    copying talib/test_stream.py -> build/lib.linux-x86_64-2.7/talib
    copying talib/test_data.py -> build/lib.linux-x86_64-2.7/talib
    copying talib/test_func.py -> build/lib.linux-x86_64-2.7/talib
    copying talib/test_abstract.py -> build/lib.linux-x86_64-2.7/talib
    running build_ext
    building 'talib._ta_lib' extension
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/talib
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/home/sergey/.local/lib/python2.7/site-packages/numpy/core/include -I/usr/include -I/usr/local/include -I/opt/include -I/opt/local/include -I/usr/include/python2.7 -c talib/_ta_lib.c -o build/temp.linux-x86_64-2.7/talib/_ta_lib.o
    talib/_ta_lib.c:526:28: fatal error: ta-lib/ta_defs.h: Нет такого файла или каталога
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

        ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-p7nQVn/ta-lib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-c0xvW3/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-p7nQVn/ta-lib/

Помогите решить проблему?

By Ishan Shah, Rekhit Pachanekar and Gaurav Singh

Technical indicators are calculated using historical price and volume data to predict the market direction. These indicators are added on charts using which you can set your entry and exit signals.

Won’t it be amazing if you can compute these technical indicators in python in a few lines of code and backtest the performance of it on many financial securities?

What started off as a hobby by Mario Fortier, Ta-Lib python library quickly rose to become one of the most famous libraries for technical analysis of stocks and other financial securities. Ta-lib includes 150+ indicators such as ADX, MACD, RSI and Bollinger Bands and candlestick pattern recognition.

However, it is difficult and sometimes frustrating to install Ta-Lib in your python. But don’t worry, in this article, we will simplify the installation for you so that you can focus on creating and backtesting strategies.

We will cover the following topics in this Ta-Lib installation tutorial.

Easiest Method

  • The EASIEST way to install Ta-Lib

Alternate Methods

  • Install Ta-Lib on Windows PC
  • Install Ta-Lib on MacOS
  • Install Ta-Lib on Linux
  • Technical Indicators using Python Ta-Lib

Before we begin, why was Ta-Lib python library created in the first place? Let us think about the reason functions were made. It was realised that instead of writing the same code, we could create a function and reduce the code length by a huge margin.

It is the same logic we apply to Ta-Lib. Instead of writing a few lines of code to first find the upper and lower bands and then the Bollinger band, we use Ta-Lib and input just one line of code to get the result.

That is all! Keeping that in mind, let us begin with the tutorial on Ta-Lib python library.


The EASIEST way to install Ta-Lib

The following is the easiest and the best way to install Ta-Lib across platforms using Anaconda Prompt.

Anaconda is an open-source Python distribution platform that helps individuals, as well as commercial enterprises, implement their Python codes easily. It also makes life easier when it comes to installing various Python libraries.

To install Ta-Lib easily, you can follow these steps:

  • Install Anaconda
  • Open the Anaconda prompt
  • Write the code: conda install -c conda-forge ta-lib
  • Press the “Enter” key

et voilà! Ta-Lib is now installed!

anaconda write code

After a few moments, the ta-lib package will be installed.

talib python installation

That’s all there is to it. Most of the time this method would help you install the package, but if you still face any problems, read on to find the installation instructions as per the operating system.

Note: The packages are first downloaded from the respective web location. You will then be prompted to confirm the installation process by pressing “y” on the keyboard. This acts as a confirmation for the installer to install the necessary files.


Install Ta-Lib on Windows PC

Step 0: We suggest the Anaconda installer for installing Python as it is easier to work with when it comes to programming in Python.

Step 1: Once you have installed Anaconda, you will use the Anaconda prompt window to install the relevant files.

Before we download the Python Ta-Lib files, we have to verify the Python version as well as the Windows System architecture (32-bit or 64-bit) on our computer.

You can find the version installed in your system by simply writing the following code in the Anaconda prompt window: python —version

You will get the output as shown below:

cmd_Python-version

For the windows architecture, you can simply right-click on your «computer» (usually named as «This-PC» or «My Computer») icon and click properties and your system details will be displayed.

windows_architectureSystem-Type

Step 2: We cannot directly use the «pip install» command when it comes to installing Ta-Lib. Thus, we will first install the «whl» file which can be found on this link: https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib

The website is a useful resource for a lot of Python extensions, but we are concerned about Ta-Lib installation for now.

You can scroll down to the section where we will find the relevant links, as shown below:

Ta-Lib_Wrapper-1

One should note that you should download the file keeping your Python version and Windows architecture (32 bit or 64 bit) in mind. E.g. Since we have the python version 3.7 installed and 64 bit Windows 7 system, we will download the file, “TA_Lib‑0.4.17‑cp37‑cp37m‑win_amd64.whl”.

As you might have guessed “cp37” implies Python version 3.7 and “win_amd64” implies Windows 64 bit operating system.

By default, the «whl» file gets downloaded in the «Downloads» folder. Since we have used Anaconda installer for Python, we will place the file in the same folder location which is shown on the Anaconda prompt.

For eg: C:Usersrekhit.p

Annaconda_prompt

And now comes the easy part.

In the Anaconda prompt, use the pip install command with the file name of the downloaded file.

Since we have downloaded the file, “TA_Lib‑0.4.17‑cp37‑cp37m‑win_amd64.whl”, the command would be, pip install TA_Lib-0.4.17-cp37-cp37m-win_amd64.whl

If there is no error, then it implies that we have successfully installed Ta-Lib. You should get a screen with the following messages.

windows_install_talib

Great! We have just finished installing the Ta-Lib Python library.

But how do we check if it is correctly installed?

On the Anaconda command prompt, you will first type “python” to interpret the program.

We will then type the following command, “import talib” and then press Enter.

If there are no errors, then it means that the python Ta-Lib library has been successfully installed on your computer.

windows_import_talib

Alternatively, you can also open Jupyter notebook (or Spyder) and try to run the same code to check if the Python Ta-Lib is installed correctly.

jupyter_import_talib


Install Ta-Lib on MacOS

In comparison to the windows installation, Python Ta-Lib installation is relatively straightforward and easy on the MacOS. But before we talk about the installation of Ta-Lib, we have to make sure the python environment is installed as well.

You can install Anaconda from here or download Python from here.

In our opinion, it is generally a good idea to install Anaconda as it helps build an environment for your python code to be executed seamlessly.

Note: During the Anaconda installation, you will be asked to install either Python 2.7 or 3.7. Since the support for Python 2.7 ended on January 1, 2020, it would be advisable to select the 3.7 version. For a seamless installation, choose the graphical installer.

mac_python_version

You will then be greeted with the following dialog box.

Dialog_box

Select “Continue” tab and choose the appropriate install destination and you will finish installation in a short time.

All right, now we move on to the main event, i.e. Ta-lib python library installation. Ok, there is one small step you need to do before the main install.

Check if you can use the ‘brew’ command. For this tutorial on how to install Ta-Lib, let us assume that the ‘brew’ command throws an error. To rectify this, we install the necessary package by using the following line of code in the MacOS shell:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

If it is successful, you will see the following messages:

message box

You might be asked to enter your password, which is part of the process.

message box

Of course, you will get a prompt which asks you to press “Return” to continue the installation or any other key to cancel the installation.

brew command message box

If you are curious about the ‘brew’ command, you can always visit this website to know more.

Great! Now that the brew command is installed, use the following code to install the Ta-Lib operating system dependencies:

brew install ta-lib

You will see the following screen

brew command installed message box

Now, we use the familiar command i.e. “pip” to install Ta-Lib on our MacOS. The command is as follows:

pip install ta-lib

You see the following files being installed on your system.

talib installed message box

Great! We have been successful in our quest to install Ta-Lib on MacOS.

But how do we check if it is correctly installed on the system? Simple, we use the following commands.

First, we call the python language by simply writing “python” in the terminal. We then use the following command to import the Ta-Lib library.

import talib

If there is no error, then we should be able to see the following screen


import talib python

Install Ta-Lib on Linux

The Ta-lib installation in Linux can be a bit tricky. The libraries necessary for the Ta-lib installation should be installed first before you install the Python wrapper.

But don’t worry! We have provided comprehensive steps on how to install the Ta-lib library in your Linux system.

Step 0: Install Anaconda in your Linux system. You can follow the documentation or execute the commands as shared below.

The following command installs the Anaconda software and creates an environment named ‘quantra’. You can use this environment for your Quantra related coding projects!

  • Install the prerequisites
  • Install Anaconda on your system

install the prerequisites for anaconda

Install the prerequisites for Anaconda
install anaconda and create a new environment
Install Anaconda and create a new environment

Step 1: Install the Ta-lib dependencies and Python wrapper by executing the following command.

install the talib dependencies and python wrapper

Install the Ta-lib dependencies and Python wrapper

This will take a couple of minutes and install all the libraries necessary for using Ta-lib.

talib installation complete

Ta-lib installation complete

Step 2: Test the Ta-lib installation by executing a sample script. We take some data and try to find the moving average using the Ta-lib libraries.

  • Install yfinance library if you do not have it already
  • Run Python in the terminal
  • Paste the following code lines to check if Ta-lib is working properly or not.
  • You should see a Simple MA and EMA column similar to the screenshot below.

launch python

Launch Python
talib output for the sample script
Ta-lib output for the sample script

The Ta-lib library is now installed in the ‘quantra’ environment! To know how to activate and switch environments, please refer to the Conda resource.

Awesome! We have now been successful in installing Python Ta-Lib on Windows, MacOS and Linux. But can we really stop here?

In the next section, we try a simple code using the Ta-Lib library.


Technical Indicators using Python Ta-Lib

We will first import the Python Ta-Lib library since we are using it to work out different indicators. Along with that, we use the python matplotlib to draw their graphs for analysis. Since we are going to be working on the stock prices, we will import the data from Yahoo Finance.

Thus, the code will be as follows:

import talib as ta import matplotlib.pyplot as plt plt.style.use('bmh')
import yfinance as yf aapl = yf.download('AAPL', '2019-1-1','2019-12-27')

In the above example, we have imported the stock price data of Apple from 1 January 2019 to 27 December 2019.

Let us start off with something simple. We will find the Simple Moving Average and the Exponential Moving Average of Apple stock data. We will use the following code:

aapl['Simple MA'] = ta.SMA(aapl['Close'],14)
aapl['EMA'] = ta.EMA(aapl['Close'], timeperiod = 14)

# Plot aapl
[['Close','Simple MA','EMA']].plot(figsize=(15,15)) plt.show()

The output is as follows:

talib_sma_ema

That was simple, wasn’t it?

Recall that at the start of this tutorial on Installing Python Ta-Lib, we talked about Bollinger Bands. Well, let’s try that one now.

# Bollinger Bands aapl['upper_band'], aapl['middle_band'], aapl['lower_band'] = ta.BBANDS(aapl['Close'], timeperiod =20)

# Plot aapl[['Close','upper_band','middle_band','lower_band']].plot(figsize=(15,15)) plt.show()

talib_bollinger_bands

Wasn’t it easy? We are sure you are getting it but let us break down the line and see how Python Ta-Lib worked out the Bollinger Bands.

To create the Bollinger bands, we simply passed the Closing Price ie the “Close” column and defined a time period of 20 for the moving average. This is done using the “ta.BBANDS()” function.

As the Bollinger bands consist of three bands, we store the data in the following three columns, “upper_band”, “middle_band” and “lower_band.

aapl[‘upper_band’], aapl[‘middle_band’], aapl[‘lower_band’] = ta.BBANDS(aapl[‘Close’], timeperiod =20)

Now, can you figure out from the code below, what are the parameters passed?

aapl['RSI'] = ta.RSI(aapl['Close'],14) aapl['RSI'].plot(figsize=(15,15)) plt.show()

talib rsi

As a bonus, we plotted the Stochastic oscillators as well, the code is given below:

aapl['slowk'], aapl['slowd'] = ta.STOCH(aapl['High'], aapl['Low'], aapl['Close'], fastk_period=14, slowk_period=3, slowk_matype=0, slowd_period=3, slowd_matype=0) aapl[['slowk','slowd']].plot(figsize=(15,15)) plt.show()

talib slow stochastic

aapl['fastk'], aapl['fastd'] = ta.STOCHF(aapl['High'], aapl['Low'], aapl['Close'], fastk_period=14, fastd_period=3, fastd_matype=0) aapl[['fastk','fastd']].plot(figsize=(15,15)) plt.show()

talib stochastic

Phew! You can go ahead and check out the other indicators on the following website as well.

You will find it very useful and knowledgeable to read through this curated compilation of some of our top blogs on:

Python for Trading
Machine Learning
Sentiment Trading
Algorithmic Trading
Options Trading
Technical Analysis


Conclusion

Thus, we have gone through the Tutorial on how to install Ta-Lib python library on Windows, MacOS as well as Linux. We have also found how to create a few technical indicators using Ta-Lib and plot them.

In case you are also interested in developing lifelong skills that will always assist you in improving your trading strategies. In this algo trading course, you will be trained in statistics & econometrics, programming, machine learning and quantitative trading methods, so you are proficient in every skill necessary to excel in quantitative & algorithmic trading. Know more about the EPAT course now!


Disclaimer: All data and information provided in this article are for informational purposes only. QuantInsti® makes no representations as to accuracy, completeness, currentness, suitability, or validity of any information in this article and will not be liable for any errors, omissions, or delays in this information or any losses, injuries, or damages arising from its display or use. All information is provided on an as-is basis.

Tests

This is a Python wrapper for TA-LIB based on Cython
instead of SWIG. From the homepage:

TA-Lib is widely used by trading software developers requiring to perform
technical analysis of financial market data.

  • Includes 150+ indicators such as ADX, MACD, RSI, Stochastic, Bollinger
    Bands, etc.
  • Candlestick pattern recognition
  • Open-source API for C/C++, Java, Perl, Python and 100% Managed .NET

The original Python bindings included with TA-Lib use
SWIG which unfortunately are difficult to install and
aren’t as efficient as they could be. Therefore this project uses
Cython and Numpy to efficiently
and cleanly bind to TA-Lib — producing results 2-4 times faster than the
SWIG interface.

In addition, this project also supports the use of the
Polars and Pandas
libraries.

Installation

You can install from PyPI:

$ python3 -m pip install TA-Lib

Or checkout the sources and run setup.py yourself:

$ python setup.py install

It also appears possible to install via
Conda Forge:

$ conda install -c conda-forge ta-lib

Dependencies

To use TA-Lib for python, you need to have the
TA-Lib already installed. You should
probably follow their installation directions for your platform, but some
suggestions are included below for reference.

Mac OS X

You can simply install using Homebrew:

$ brew install ta-lib

If you are using Apple Silicon, such as the M1 processors, and building mixed
architecture Homebrew projects, you might want to make sure it’s being built
for your architecture:

$ arch -arm64 brew install ta-lib

And perhaps you can set these before installing with pip:

$ export TA_INCLUDE_PATH="$(brew --prefix ta-lib)/include"
$ export TA_LIBRARY_PATH="$(brew --prefix ta-lib)/lib"

You might also find this helpful, particularly if you have tried several
different installations without success:

$ your-arm64-python -m pip install --no-cache-dir ta-lib
Windows

Download ta-lib-0.4.0-msvc.zip
and unzip to C:ta-lib.

This is a 32-bit binary release. If you want to use 64-bit Python, you will
need to build a 64-bit version of the library. Some unofficial (and
unsupported
) instructions for building on 64-bit Windows 10, here for
reference:

  1. Download and Unzip ta-lib-0.4.0-msvc.zip
  2. Move the Unzipped Folder ta-lib to C:
  3. Download and Install Visual Studio Community 2015
    • Remember to Select [Visual C++] Feature
  4. Build TA-Lib Library
    • From Windows Start Menu, Start [VS2015 x64 Native Tools Command Prompt]
    • Move to C:ta-libcmakecdrwin32msvc
    • Build the Library nmake

You might also try these unofficial windows binaries for both 32-bit and
64-bit:

https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib

Linux

Download ta-lib-0.4.0-src.tar.gz and:

$ tar -xzf ta-lib-0.4.0-src.tar.gz
$ cd ta-lib/
$ ./configure --prefix=/usr
$ make
$ sudo make install

If you build TA-Lib using make -jX it will fail but that’s OK!
Simply rerun make -jX followed by [sudo] make install.

Note: if your directory path includes spaces, the installation will probably
fail with No such file or directory errors.

Troubleshooting

If you get a warning that looks like this:

setup.py:79: UserWarning: Cannot find ta-lib library, installation may fail.
warnings.warn('Cannot find ta-lib library, installation may fail.')

This typically means setup.py can’t find the underlying TA-Lib
library, a dependency which needs to be installed.

If you installed the underlying TA-Lib library with a custom prefix
(e.g., with ./configure --prefix=$PREFIX), then when you go to install
this python wrapper you can specify additional search paths to find the
library and include files for the underlying TA-Lib library using the
TA_LIBRARY_PATH and TA_INCLUDE_PATH environment variables:

$ export TA_LIBRARY_PATH=$PREFIX/lib
$ export TA_INCLUDE_PATH=$PREFIX/include
$ python setup.py install # or pip install ta-lib

Sometimes installation will produce build errors like this:

talib/_ta_lib.c:601:10: fatal error: ta-lib/ta_defs.h: No such file or directory
  601 | #include "ta-lib/ta_defs.h"
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.

or:

common.obj : error LNK2001: unresolved external symbol TA_SetUnstablePeriod
common.obj : error LNK2001: unresolved external symbol TA_Shutdown
common.obj : error LNK2001: unresolved external symbol TA_Initialize
common.obj : error LNK2001: unresolved external symbol TA_GetUnstablePeriod
common.obj : error LNK2001: unresolved external symbol TA_GetVersionString

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.

Sometimes installation will fail with errors like this:

talib/common.c:8:22: fatal error: pyconfig.h: No such file or directory
 #include "pyconfig.h"
                      ^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

This typically means that you need the Python headers, and should run
something like:

$ sudo apt-get install python3-dev

Sometimes building the underlying TA-Lib library has errors running
make that look like this:

../libtool: line 1717: cd: .libs/libta_lib.lax/libta_abstract.a: No such file or directory
make[2]: *** [libta_lib.la] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

This might mean that the directory path to the underlying TA-Lib library
has spaces in the directory names. Try putting it in a path that does not have
any spaces and trying again.

Sometimes you might get this error running setup.py:

/usr/include/limits.h:26:10: fatal error: bits/libc-header-start.h: No such file or directory
#include <bits/libc-header-start.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~

This is likely an issue with trying to compile for 32-bit platform but
without the appropriate headers. You might find some success looking at the
first answer to this question.

If you wonder why STOCHRSI gives you different results than you expect,
probably you want STOCH applied to RSI, which is a little different
than the STOCHRSI which is STOCHF applied to RSI:

>>> import talib
>>> import numpy
>>> c = numpy.random.randn(100)

# this is the library function
>>> k, d = talib.STOCHRSI(c)

# this produces the same result, calling STOCHF
>>> rsi = talib.RSI(c)
>>> k, d = talib.STOCHF(rsi, rsi, rsi)

# you might want this instead, calling STOCH
>>> rsi = talib.RSI(c)
>>> k, d = talib.STOCH(rsi, rsi, rsi)

If the build appears to hang, you might be running on a VM with not enough
memory — try 1 GB or 2 GB.

Function API

Similar to TA-Lib, the Function API provides a lightweight wrapper of the
exposed TA-Lib indicators.

Each function returns an output array and have default values for their
parameters, unless specified as keyword arguments. Typically, these functions
will have an initial «lookback» period (a required number of observations
before an output is generated) set to NaN.

For convenience, the Function API supports both numpy.ndarray and
pandas.Series and polars.Series inputs.

All of the following examples use the Function API:

import numpy
import talib

close = numpy.random.random(100)

Calculate a simple moving average of the close prices:

output = talib.SMA(close)

Calculating bollinger bands, with triple exponential moving average:

from talib import MA_Type

upper, middle, lower = talib.BBANDS(close, matype=MA_Type.T3)

Calculating momentum of the close prices, with a time period of 5:

output = talib.MOM(close, timeperiod=5)
NaN’s

The underlying TA-Lib C library handles NaN’s in a sometimes surprising manner
by typically propagating NaN’s to the end of the output, for example:

>>> c = numpy.array([1.0, 2.0, 3.0, np.nan, 4.0, 5.0, 6.0])

>>> talib.SMA(c, 3)
array([nan, nan,  2., nan, nan, nan, nan])

You can compare that to a Pandas rolling mean, where their approach is to
output NaN until enough «lookback» values are observed to generate new outputs:

>>> c = pandas.Series([1.0, 2.0, 3.0, np.nan, 4.0, 5.0, 6.0])

>>> c.rolling(3).mean()
0    NaN
1    NaN
2    2.0
3    NaN
4    NaN
5    NaN
6    5.0
dtype: float64

Abstract API

If you’re already familiar with using the function API, you should feel right
at home using the Abstract API.

Every function takes a collection of named inputs, either a dict of
numpy.ndarray or pandas.Series or polars.Series, or a
pandas.DataFrame or polars.DataFrame. If a pandas.DataFrame or
polars.DataFrame is provided, the output is returned as the same type
with named output columns.

For example, inputs could be provided for the typical «OHLCV» data:

import numpy as np

# note that all ndarrays must be the same length!
inputs = {
    'open': np.random.random(100),
    'high': np.random.random(100),
    'low': np.random.random(100),
    'close': np.random.random(100),
    'volume': np.random.random(100)
}

Functions can either be imported directly or instantiated by name:

from talib import abstract

# directly
SMA = abstract.SMA

# or by name
SMA = abstract.Function('sma')

From there, calling functions is basically the same as the function API:

from talib.abstract import *

# uses close prices (default)
output = SMA(inputs, timeperiod=25)

# uses open prices
output = SMA(inputs, timeperiod=25, price='open')

# uses close prices (default)
upper, middle, lower = BBANDS(inputs, 20, 2, 2)

# uses high, low, close (default)
slowk, slowd = STOCH(inputs, 5, 3, 0, 3, 0) # uses high, low, close by default

# uses high, low, open instead
slowk, slowd = STOCH(inputs, 5, 3, 0, 3, 0, prices=['high', 'low', 'open'])

Streaming API

An experimental Streaming API was added that allows users to compute the latest
value of an indicator. This can be faster than using the Function API, for
example in an application that receives streaming data, and wants to know just
the most recent updated indicator value.

import talib
from talib import stream

close = np.random.random(100)

# the Function API
output = talib.SMA(close)

# the Streaming API
latest = stream.SMA(close)

# the latest value is the same as the last output value
assert (output[-1] - latest) < 0.00001

Supported Indicators and Functions

We can show all the TA functions supported by TA-Lib, either as a list or
as a dict sorted by group (e.g. «Overlap Studies», «Momentum Indicators»,
etc):

import talib

# list of functions
print talib.get_functions()

# dict of functions by group
print talib.get_function_groups()

Indicator Groups

  • Overlap Studies
  • Momentum Indicators
  • Volume Indicators
  • Volatility Indicators
  • Price Transform
  • Cycle Indicators
  • Pattern Recognition
Overlap Studies
BBANDS               Bollinger Bands
DEMA                 Double Exponential Moving Average
EMA                  Exponential Moving Average
HT_TRENDLINE         Hilbert Transform - Instantaneous Trendline
KAMA                 Kaufman Adaptive Moving Average
MA                   Moving average
MAMA                 MESA Adaptive Moving Average
MAVP                 Moving average with variable period
MIDPOINT             MidPoint over period
MIDPRICE             Midpoint Price over period
SAR                  Parabolic SAR
SAREXT               Parabolic SAR - Extended
SMA                  Simple Moving Average
T3                   Triple Exponential Moving Average (T3)
TEMA                 Triple Exponential Moving Average
TRIMA                Triangular Moving Average
WMA                  Weighted Moving Average
Momentum Indicators
ADX                  Average Directional Movement Index
ADXR                 Average Directional Movement Index Rating
APO                  Absolute Price Oscillator
AROON                Aroon
AROONOSC             Aroon Oscillator
BOP                  Balance Of Power
CCI                  Commodity Channel Index
CMO                  Chande Momentum Oscillator
DX                   Directional Movement Index
MACD                 Moving Average Convergence/Divergence
MACDEXT              MACD with controllable MA type
MACDFIX              Moving Average Convergence/Divergence Fix 12/26
MFI                  Money Flow Index
MINUS_DI             Minus Directional Indicator
MINUS_DM             Minus Directional Movement
MOM                  Momentum
PLUS_DI              Plus Directional Indicator
PLUS_DM              Plus Directional Movement
PPO                  Percentage Price Oscillator
ROC                  Rate of change : ((price/prevPrice)-1)*100
ROCP                 Rate of change Percentage: (price-prevPrice)/prevPrice
ROCR                 Rate of change ratio: (price/prevPrice)
ROCR100              Rate of change ratio 100 scale: (price/prevPrice)*100
RSI                  Relative Strength Index
STOCH                Stochastic
STOCHF               Stochastic Fast
STOCHRSI             Stochastic Relative Strength Index
TRIX                 1-day Rate-Of-Change (ROC) of a Triple Smooth EMA
ULTOSC               Ultimate Oscillator
WILLR                Williams' %R
Volume Indicators
AD                   Chaikin A/D Line
ADOSC                Chaikin A/D Oscillator
OBV                  On Balance Volume
Cycle Indicators
HT_DCPERIOD          Hilbert Transform - Dominant Cycle Period
HT_DCPHASE           Hilbert Transform - Dominant Cycle Phase
HT_PHASOR            Hilbert Transform - Phasor Components
HT_SINE              Hilbert Transform - SineWave
HT_TRENDMODE         Hilbert Transform - Trend vs Cycle Mode
Price Transform
AVGPRICE             Average Price
MEDPRICE             Median Price
TYPPRICE             Typical Price
WCLPRICE             Weighted Close Price
Volatility Indicators
ATR                  Average True Range
NATR                 Normalized Average True Range
TRANGE               True Range
Pattern Recognition
CDL2CROWS            Two Crows
CDL3BLACKCROWS       Three Black Crows
CDL3INSIDE           Three Inside Up/Down
CDL3LINESTRIKE       Three-Line Strike
CDL3OUTSIDE          Three Outside Up/Down
CDL3STARSINSOUTH     Three Stars In The South
CDL3WHITESOLDIERS    Three Advancing White Soldiers
CDLABANDONEDBABY     Abandoned Baby
CDLADVANCEBLOCK      Advance Block
CDLBELTHOLD          Belt-hold
CDLBREAKAWAY         Breakaway
CDLCLOSINGMARUBOZU   Closing Marubozu
CDLCONCEALBABYSWALL  Concealing Baby Swallow
CDLCOUNTERATTACK     Counterattack
CDLDARKCLOUDCOVER    Dark Cloud Cover
CDLDOJI              Doji
CDLDOJISTAR          Doji Star
CDLDRAGONFLYDOJI     Dragonfly Doji
CDLENGULFING         Engulfing Pattern
CDLEVENINGDOJISTAR   Evening Doji Star
CDLEVENINGSTAR       Evening Star
CDLGAPSIDESIDEWHITE  Up/Down-gap side-by-side white lines
CDLGRAVESTONEDOJI    Gravestone Doji
CDLHAMMER            Hammer
CDLHANGINGMAN        Hanging Man
CDLHARAMI            Harami Pattern
CDLHARAMICROSS       Harami Cross Pattern
CDLHIGHWAVE          High-Wave Candle
CDLHIKKAKE           Hikkake Pattern
CDLHIKKAKEMOD        Modified Hikkake Pattern
CDLHOMINGPIGEON      Homing Pigeon
CDLIDENTICAL3CROWS   Identical Three Crows
CDLINNECK            In-Neck Pattern
CDLINVERTEDHAMMER    Inverted Hammer
CDLKICKING           Kicking
CDLKICKINGBYLENGTH   Kicking - bull/bear determined by the longer marubozu
CDLLADDERBOTTOM      Ladder Bottom
CDLLONGLEGGEDDOJI    Long Legged Doji
CDLLONGLINE          Long Line Candle
CDLMARUBOZU          Marubozu
CDLMATCHINGLOW       Matching Low
CDLMATHOLD           Mat Hold
CDLMORNINGDOJISTAR   Morning Doji Star
CDLMORNINGSTAR       Morning Star
CDLONNECK            On-Neck Pattern
CDLPIERCING          Piercing Pattern
CDLRICKSHAWMAN       Rickshaw Man
CDLRISEFALL3METHODS  Rising/Falling Three Methods
CDLSEPARATINGLINES   Separating Lines
CDLSHOOTINGSTAR      Shooting Star
CDLSHORTLINE         Short Line Candle
CDLSPINNINGTOP       Spinning Top
CDLSTALLEDPATTERN    Stalled Pattern
CDLSTICKSANDWICH     Stick Sandwich
CDLTAKURI            Takuri (Dragonfly Doji with very long lower shadow)
CDLTASUKIGAP         Tasuki Gap
CDLTHRUSTING         Thrusting Pattern
CDLTRISTAR           Tristar Pattern
CDLUNIQUE3RIVER      Unique 3 River
CDLUPSIDEGAP2CROWS   Upside Gap Two Crows
CDLXSIDEGAP3METHODS  Upside/Downside Gap Three Methods
Statistic Functions
BETA                 Beta
CORREL               Pearson's Correlation Coefficient (r)
LINEARREG            Linear Regression
LINEARREG_ANGLE      Linear Regression Angle
LINEARREG_INTERCEPT  Linear Regression Intercept
LINEARREG_SLOPE      Linear Regression Slope
STDDEV               Standard Deviation
TSF                  Time Series Forecast
VAR                  Variance

Небольшая предыстория. Длительное время пользуюсь Visual studio, устанавливал через pip разные библиотеки и тут возникла проблема с библиотекой Ta-lib. Скорее всего проблема не конкретно в библиотеке, сколько в самом pip. Ниже полный код, что пишу в powershell (pip install TA-Lib==0.4.25 — версию указал в попытке решить проблему, но не помогло)

Как видно ошибка fatal error C1083: ЌҐ г¤ Ґвбп ®вЄалвм д ©« ўЄ«о祭ЁҐ: ta_libc.h: No such file or directory,
Но у меня нет такой директории. Проблема в Юникоде библиотеки? В PS (правее, где указана директория как я понимаю) теперь тоже отражается белиберда из символов ( скрин из вложения) .

Пжлст, добрые люди помогите.

Python
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
pip install TA-Lib==0.4.25
Collecting TA-Lib==0.4.25
  Using cached TA-Lib-0.4.25.tar.gz (271 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy in c:usersняшаappdatalocalprogramspythonpython311libsite-packages (from TA-Lib==0.4.25) (1.23.4)
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 buildlib.win-amd64-cpython-311
      creating buildlib.win-amd64-cpython-311talib
      copying talibabstract.py -> buildlib.win-amd64-cpython-311talib
      copying talibdeprecated.py -> buildlib.win-amd64-cpython-311talib        
      copying talibstream.py -> buildlib.win-amd64-cpython-311talib
      copying talibtest_abstract.py -> buildlib.win-amd64-cpython-311talib
      copying talibtest_data.py -> buildlib.win-amd64-cpython-311talib
      copying talibtest_func.py -> buildlib.win-amd64-cpython-311talib
      copying talibtest_pandas.py -> buildlib.win-amd64-cpython-311talib
      copying talibtest_polars.py -> buildlib.win-amd64-cpython-311talib
      copying talibtest_stream.py -> buildlib.win-amd64-cpython-311talib
      copying talib__init__.py -> buildlib.win-amd64-cpython-311talib
      running build_ext
      building 'talib._ta_lib' extension
      creating buildtemp.win-amd64-cpython-311
      creating buildtemp.win-amd64-cpython-311Release
      creating buildtemp.win-amd64-cpython-311Releasetalib
      "C:Program Files (x86)Microsoft Visual Studio2017BuildToolsVCToolsMSVC14.16.27023binHostX86x64cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ic:ta-libcinclude -IC:UsersНяшаAppDataLocalTemppip-build-env-vdqp76r7normalLibsite-packagesnumpycoreinclude -IC:UsersНяшаAppDataLocalProgramsPythonPython311include -IC:UsersНяшаAppDataLocalProgramsPythonPython311Include "-IC:Program Files (x86)Microsoft Visual Studio2017BuildToolsVCToolsMSVC14.16.27023include" "-IC:Program Files (x86)Windows Kits10include10.0.17763.0ucrt" "-IC:Program Files (x86)Windows Kits10include10.0.17763.0shared" "-IC:Program Files (x86)Windows Kits10include10.0.17763.0um" "-IC:Program Files (x86)Windows Kits10include10.0.17763.0winrt" "-IC:Program Files (x86)Windows Kits10include10.0.17763.0cppwinrt" /Tctalib/_ta_lib.c /Fobuildtemp.win-amd64-cpython-311Releasetalib/_ta_lib.obj
      _ta_lib.c
      talib/_ta_lib.c(745):[COLOR="Red"] fatal error C1083: ЌҐ г¤ Ґвбп ®вЄалвм д ©« ўЄ«о祭ЁҐ: ta_libc.h: No such file or directory,[/COLOR]
      error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\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

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь

Although I had installed numpy and apparently have it up to date, I’ve spent several hours banging my head into a wall trying to

pip install talib
pip install ta-lib

and I got all sorts of cool errors, they look like big long blocks of garble, at the end rechecked pip install numpy and it still seems to work.

Error:

C:WINDOWSsystem32>pip install talib Collecting talib Using cached talib-0.1.1.tar.gz (1.3 kB) Building wheels for collected packages: talib Building wheel for talib (setup.py) ... error ERROR: Command errored out with exit status 1: command: 'c:usersm sanaconda3python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\M S\AppData\Local\Temp\pip-install-chf6hp7j\talib_68b5a96fb6c24bf9bb216a856ab5c8f2\setup.py'"'"'; __file__='"'"'C:\Users\M S\AppData\Local\Temp\pip-install-chf6hp7j\talib_68b5a96fb6c24bf9bb216a856ab5c8f2\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:UsersM SAppDataLocalTemppip-wheel-xkdrzdhz' cwd: C:UsersM SAppDataLocalTemppip-install-chf6hp7jtalib_68b5a96fb6c24bf9bb216a856ab5c8f2 Complete output (29 lines): running bdist_wheel running build running build_py creating build creating buildlib creating buildlibtalib copying talibcli.py -> buildlibtalib copying talib__init__.py -> buildlibtalib installing to buildbdist.win-amd64wheel running install Traceback (most recent call last): File "<string>", line 1, in <module> File "C:UsersM SAppDataLocalTemppip-install-chf6hp7jtalib_68b5a96fb6c24bf9bb216a856ab5c8f2setup.py", line 32, in <module> setup( File "c:usersm sanaconda3libdistutilscore.py", line 148, in setup dist.run_commands() File "c:usersm sanaconda3libdistutilsdist.py", line 966, in run_commands self.run_command(cmd) File "c:usersm sanaconda3libdistutilsdist.py", line 985, in run_command cmd_obj.run() File "c:usersm sanaconda3libsite-packageswheelbdist_wheel.py", line 259, in run self.run_command('install') File "c:usersm sanaconda3libdistutilscmd.py", line 313, in run_command self.distribution.run_command(command) File "c:usersm sanaconda3libdistutilsdist.py", line 985, in run_command cmd_obj.run() File "C:UsersM SAppDataLocalTemppip-install-chf6hp7jtalib_68b5a96fb6c24bf9bb216a856ab5c8f2setup.py", line 20, in run raise Exception("You probably meant to install and run ta-lib") Exception: You probably meant to install and run ta-lib ---------------------------------------- ERROR: Failed building wheel for talib Running setup.py clean for talib Failed to build talib Installing collected packages: talib Running setup.py install for talib ... error ERROR: Command errored out with exit status 1: command: 'c:usersm sanaconda3python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\M S\AppData\Local\Temp\pip-install-chf6hp7j\talib_68b5a96fb6c24bf9bb216a856ab5c8f2\setup.py'"'"'; __file__='"'"'C:\Users\M S\AppData\Local\Temp\pip-install-chf6hp7j\talib_68b5a96fb6c24bf9bb216a856ab5c8f2\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersM SAppDataLocalTemppip-record-nl2y7qjqinstall-record.txt' --single-version-externally-managed --compile --install-headers 'c:usersm sanaconda3Includetalib' cwd: C:UsersM SAppDataLocalTemppip-install-chf6hp7jtalib_68b5a96fb6c24bf9bb216a856ab5c8f2 Complete output (14 lines): running install Traceback (most recent call last): File "<string>", line 1, in <module> File "C:UsersM SAppDataLocalTemppip-install-chf6hp7jtalib_68b5a96fb6c24bf9bb216a856ab5c8f2setup.py", line 32, in <module> setup( File "c:usersm sanaconda3libdistutilscore.py", line 148, in setup dist.run_commands() File "c:usersm sanaconda3libdistutilsdist.py", line 966, in run_commands self.run_command(cmd) File "c:usersm sanaconda3libdistutilsdist.py", line 985, in run_command cmd_obj.run() File "C:UsersM SAppDataLocalTemppip-install-chf6hp7jtalib_68b5a96fb6c24bf9bb216a856ab5c8f2setup.py", line 20, in run raise Exception("You probably meant to install and run ta-lib") Exception: You probably meant to install and run ta-lib ---------------------------------------- ERROR: Command errored out with exit status 1: 'c:usersm sanaconda3python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\M S\AppData\Local\Temp\pip-install-chf6hp7j\talib_68b5a96fb6c24bf9bb216a856ab5c8f2\setup.py'"'"'; __file__='"'"'C:\Users\M S\AppData\Local\Temp\pip-install-chf6hp7j\talib_68b5a96fb6c24bf9bb216a856ab5c8f2\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersM SAppDataLocalTemppip-record-nl2y7qjqinstall-record.txt' --single-version-externally-managed --compile --install-headers 'c:usersm sanaconda3Includetalib' Check the logs for full command output.

C:WINDOWSsystem32>pip install ta-lib

Error:

Collecting ta-lib Using cached TA-Lib-0.4.19.tar.gz (267 kB) Requirement already satisfied: numpy in c:usersm sanaconda3libsite-packages (from ta-lib) (1.18.5) Building wheels for collected packages: ta-lib Building wheel for ta-lib (setup.py) ... error ERROR: Command errored out with exit status 1: command: 'c:usersm sanaconda3python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\M S\AppData\Local\Temp\pip-install-0fhcistu\ta-lib_195c704785a44fab8ddfc0a4fb0a501a\setup.py'"'"'; __file__='"'"'C:\Users\M S\AppData\Local\Temp\pip-install-0fhcistu\ta-lib_195c704785a44fab8ddfc0a4fb0a501a\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:UsersM SAppDataLocalTemppip-wheel-8lsv39uj' cwd: C:UsersM SAppDataLocalTemppip-install-0fhcistuta-lib_195c704785a44fab8ddfc0a4fb0a501a Complete output (27 lines): C:UsersM SAppDataLocalTemppip-install-0fhcistuta-lib_195c704785a44fab8ddfc0a4fb0a501asetup.py:71: UserWarning: Cannot find ta-lib library, installation may fail. warnings.warn('Cannot find ta-lib library, installation may fail.') running bdist_wheel running build running build_py creating build creating buildlib.win-amd64-3.8 creating buildlib.win-amd64-3.8talib copying talibabstract.py -> buildlib.win-amd64-3.8talib copying talibdeprecated.py -> buildlib.win-amd64-3.8talib copying talibstream.py -> buildlib.win-amd64-3.8talib copying talibtest_abstract.py -> buildlib.win-amd64-3.8talib copying talibtest_data.py -> buildlib.win-amd64-3.8talib copying talibtest_func.py -> buildlib.win-amd64-3.8talib copying talibtest_pandas.py -> buildlib.win-amd64-3.8talib copying talibtest_stream.py -> buildlib.win-amd64-3.8talib copying talib__init__.py -> buildlib.win-amd64-3.8talib running build_ext skipping 'talib_ta_lib.c' Cython extension (up-to-date) building 'talib._ta_lib' extension creating buildtemp.win-amd64-3.8 creating buildtemp.win-amd64-3.8Release creating buildtemp.win-amd64-3.8Releasetalib C:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.28.29333binHostX86x64cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:ta-libcinclude "-Ic:usersm sanaconda3libsite-packagesnumpycoreinclude" "-Ic:usersm sanaconda3include" "-Ic:usersm sanaconda3include" "-IC:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.28.29333ATLMFCinclude" "-IC:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.28.29333include" "-IC:Program Files (x86)Windows Kits10include10.0.18362.0ucrt" "-IC:Program Files (x86)Windows Kits10include10.0.18362.0shared" "-IC:Program Files (x86)Windows Kits10include10.0.18362.0um" "-IC:Program Files (x86)Windows Kits10include10.0.18362.0winrt" "-IC:Program Files (x86)Windows Kits10include10.0.18362.0cppwinrt" /Tctalib_ta_lib.c /Fobuildtemp.win-amd64-3.8Releasetalib_ta_lib.obj _ta_lib.c talib_ta_lib.c(609): fatal error C1083: Cannot open include file: 'ta_libc.h': No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe' failed with exit status 2 ---------------------------------------- ERROR: Failed building wheel for ta-lib Running setup.py clean for ta-lib Failed to build ta-lib Installing collected packages: ta-lib Running setup.py install for ta-lib ... error ERROR: Command errored out with exit status 1: command: 'c:usersm sanaconda3python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\M S\AppData\Local\Temp\pip-install-0fhcistu\ta-lib_195c704785a44fab8ddfc0a4fb0a501a\setup.py'"'"'; __file__='"'"'C:\Users\M S\AppData\Local\Temp\pip-install-0fhcistu\ta-lib_195c704785a44fab8ddfc0a4fb0a501a\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersM SAppDataLocalTemppip-record-f37b7we_install-record.txt' --single-version-externally-managed --compile --install-headers 'c:usersm sanaconda3Includeta-lib' cwd: C:UsersM SAppDataLocalTemppip-install-0fhcistuta-lib_195c704785a44fab8ddfc0a4fb0a501a Complete output (27 lines): C:UsersM SAppDataLocalTemppip-install-0fhcistuta-lib_195c704785a44fab8ddfc0a4fb0a501asetup.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 buildlib.win-amd64-3.8 creating buildlib.win-amd64-3.8talib copying talibabstract.py -> buildlib.win-amd64-3.8talib copying talibdeprecated.py -> buildlib.win-amd64-3.8talib copying talibstream.py -> buildlib.win-amd64-3.8talib copying talibtest_abstract.py -> buildlib.win-amd64-3.8talib copying talibtest_data.py -> buildlib.win-amd64-3.8talib copying talibtest_func.py -> buildlib.win-amd64-3.8talib copying talibtest_pandas.py -> buildlib.win-amd64-3.8talib copying talibtest_stream.py -> buildlib.win-amd64-3.8talib copying talib__init__.py -> buildlib.win-amd64-3.8talib running build_ext skipping 'talib_ta_lib.c' Cython extension (up-to-date) building 'talib._ta_lib' extension creating buildtemp.win-amd64-3.8 creating buildtemp.win-amd64-3.8Release creating buildtemp.win-amd64-3.8Releasetalib C:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.28.29333binHostX86x64cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:ta-libcinclude "-Ic:usersm sanaconda3libsite-packagesnumpycoreinclude" "-Ic:usersm sanaconda3include" "-Ic:usersm sanaconda3include" "-IC:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.28.29333ATLMFCinclude" "-IC:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.28.29333include" "-IC:Program Files (x86)Windows Kits10include10.0.18362.0ucrt" "-IC:Program Files (x86)Windows Kits10include10.0.18362.0shared" "-IC:Program Files (x86)Windows Kits10include10.0.18362.0um" "-IC:Program Files (x86)Windows Kits10include10.0.18362.0winrt" "-IC:Program Files (x86)Windows Kits10include10.0.18362.0cppwinrt" /Tctalib_ta_lib.c /Fobuildtemp.win-amd64-3.8Releasetalib_ta_lib.obj _ta_lib.c talib_ta_lib.c(609): fatal error C1083: Cannot open include file: 'ta_libc.h': No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe' failed with exit status 2 ---------------------------------------- ERROR: Command errored out with exit status 1: 'c:usersm sanaconda3python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\M S\AppData\Local\Temp\pip-install-0fhcistu\ta-lib_195c704785a44fab8ddfc0a4fb0a501a\setup.py'"'"'; __file__='"'"'C:\Users\M S\AppData\Local\Temp\pip-install-0fhcistu\ta-lib_195c704785a44fab8ddfc0a4fb0a501a\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersM SAppDataLocalTemppip-record-f37b7we_install-record.txt' --single-version-externally-managed --compile --install-headers 'c:usersm sanaconda3Includeta-lib' Check the logs for full command output.

C:WINDOWSsystem32>pip install numpy
Requirement already satisfied: numpy in c:usersm sanaconda3libsite-packages (1.18.5)

Now, I have googled a few different things and then proceeded to download Windows Visual Community 2019 and then an older 2015 version, then also a MySQL developer package that all-in-all ended up being about 20gigs of random information that, for the life of me, I cannot understand why trying to use talib.SMA and other commands I would be forced to have on my system. My python paths are myinitialsdesktop , anaconda3scripts , anaconda3 and anaconda3Librarybin

It used to tell me that in the code

import numpy as np
import matplotlib.pyplot as plt
import yfinance as yf
import talib

No module talib exists or something very similar, now it’s telling me No module named yfinance.

How/where/what do I do to get any progress from here? Did I disable yfinance the module somehow, and why won’t freaking talib just import. I can’t explain how annoyed, frustrated and spread-apart the internet jury-rigged solutions are, why my hard drive has 20Gigs of what I consider irrelevant extra crab on it, and what I’m supposed to do next. I suppose I could reformat my whole drive, install Spyder and only Spyder without Jupyter notebook on it, or simply light the whole thing on fire but I am trying to put to use a course I’ve read and made plenty of screenshots through and while simple things work, others will Not function without talib commands. Thank you for any time, thoughts or comments on the matter.

#installation #pip #windows-7 #ta-lib

Вопрос:

Когда я пытаюсь установить пакет TA-Lib для Python 3.8.10 в Windows 7 с помощью

 pip install TA-Lib
 

Я получаю следующее сообщение

 Collecting TA-Lib
  Using cached TA-Lib-0.4.20.tar.gz (266 kB)
Requirement already satisfied: numpy in e:pythonusershmd911appdatalocalprog
ramspythonpython38libsite-packages (from TA-Lib) (1.20.3)
Using legacy 'setup.py install' for TA-Lib, since package 'wheel' is not install
ed.
Installing collected packages: TA-Lib
    Running setup.py install for TA-Lib ... error
    ERROR: Command errored out with exit status 1:
     command: 'e:pythonusershmd911appdatalocalprogramspythonpython38pyth
on.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:
Usershmd911AppDataLocalTemppip-install-1sjw7dzwta-lib_f5336da82d8a497
5b25a03c56e936c3asetup.py'"'"'; __file__='"'"'C:Usershmd911AppDataLocal
Temppip-install-1sjw7dzwta-lib_f5336da82d8a4975b25a03c56e936c3asetup.py'
"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__f
ile__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code =
f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __fi
le__, '"'"'exec'"'"'))' install --record 'C:Usershmd911AppDataLocalTemppip-
record-bi4hzqj2install-record.txt' --single-version-externally-managed --compil
e --install-headers 'e:pythonusershmd911appdatalocalprogramspythonpython3
8IncludeTA-Lib'
         cwd: C:Usershmd911AppDataLocalTemppip-install-1sjw7dzwta-lib_f533
6da82d8a4975b25a03c56e936c3a
    Complete output (20 lines):
    C:Usershmd911AppDataLocalTemppip-install-1sjw7dzwta-lib_f5336da82d8a49
75b25a03c56e936c3asetup.py:75: UserWarning: Cannot find ta-lib library, install
ation may fail.
      warnings.warn('Cannot find ta-lib library, installation may fail.')
    running install
    running build
    running build_py
    creating build
    creating buildlib.win-amd64-3.8
    creating buildlib.win-amd64-3.8talib
    copying talibabstract.py -> buildlib.win-amd64-3.8talib
    copying talibdeprecated.py -> buildlib.win-amd64-3.8talib
    copying talibstream.py -> buildlib.win-amd64-3.8talib
    copying talibtest_abstract.py -> buildlib.win-amd64-3.8talib
    copying talibtest_data.py -> buildlib.win-amd64-3.8talib
    copying talibtest_func.py -> buildlib.win-amd64-3.8talib
    copying talibtest_pandas.py -> buildlib.win-amd64-3.8talib
    copying talibtest_stream.py -> buildlib.win-amd64-3.8talib
    copying talib__init__.py -> buildlib.win-amd64-3.8talib
    running build_ext
    building 'talib._ta_lib' extension
    error: Microsoft Visual C   14.0 or greater is required. Get it with "Micros
oft C   Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

    ----------------------------------------
ERROR: Command errored out with exit status 1: 'e:pythonusershmd911appdatalo
calprogramspythonpython38python.exe' -u -c 'import io, os, sys, setuptools,
tokenize; sys.argv[0] = '"'"'C:Usershmd911AppDataLocalTemppip-install
-1sjw7dzwta-lib_f5336da82d8a4975b25a03c56e936c3asetup.py'"'"'; __file__='"'"
'C:Usershmd911AppDataLocalTemppip-install-1sjw7dzwta-lib_f5336da82d
8a4975b25a03c56e936c3asetup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open
)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools im
port setup; setup()'"'"');code = f.read().replace('"'"'rn'"'"', '"'"'n'"'"');
f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:Us
ershmd911AppDataLocalTemppip-record-bi4hzqj2install-record.txt' --single-ve
rsion-externally-managed --compile --install-headers 'e:pythonusershmd911appd
atalocalprogramspythonpython38IncludeTA-Lib' Check the logs for full comma
nd output.
 

У кого-нибудь есть какие-либо идеи о том, как мне следует установить пакет TA-Lib? Я не уверен, из-за чего на самом деле произошла эта ошибка. Мы будем очень признательны за любые советы. Я очень плохо разбираюсь в этой ошибке, о которой она мне говорит. Я считаю, что моя проблема связана с Microsoft Visual C или чем-то в этом роде. Я попытался установить разные версии Microsoft Visual C , но сообщение об ошибке все равно остается тем же.

0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии

А вот еще интересные материалы:

  • Яшка сломя голову остановился исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного где ошибка
  • Pip install socket ошибка
  • Pip install scipy ошибка