ta-lib-python icon indicating copy to clipboard operation
ta-lib-python copied to clipboard

Failed to install ta-lib

Open yiugn opened this issue 10 years ago • 62 comments

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

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

C:\Users\yiugn_>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:\Users\yiugn_\Anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\yiugn_\AppData\Local\Temp\pip-build-of4wiq6k\ta-lib\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d C:\Users\yiugn_\AppData\Local\Temp\tmpq3fkuotfpip-wheel- --python-tag cp35: C:\Users\yiugn_\Anaconda3\lib\site-packages\Cython\Distutils\old_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 build\lib.win-amd64-3.5 creating build\lib.win-amd64-3.5\talib copying talib\deprecated.py -> build\lib.win-amd64-3.5\talib copying talib\test_abstract.py -> build\lib.win-amd64-3.5\talib copying talib\test_data.py -> build\lib.win-amd64-3.5\talib copying talib\test_func.py -> build\lib.win-amd64-3.5\talib copying talib\test_stream.py -> build\lib.win-amd64-3.5\talib copying talib_init_.py -> build\lib.win-amd64-3.5\talib running build_ext skipping 'talib\common.c' Cython extension (up-to-date) building 'talib.common' extension creating build\temp.win-amd64-3.5 creating build\temp.win-amd64-3.5\Release creating build\temp.win-amd64-3.5\Release\talib C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\yiugn_\Anaconda3\lib\site-packages\numpy\core\include -Ic:\ta-lib\c\include -IC:\Users\yiugn_\Anaconda3\include -IC:\Users\yiugn_\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tctalib\common.c /Fobuild\temp.win-amd64-3.5\Release\talib\common.obj common.c C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:\ta-lib\c\lib /LIBPATH:C:\Users\yiugn_\Anaconda3\libs /LIBPATH:C:\Users\yiugn_\Anaconda3\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.10240.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64" ta_libc_cdr.lib /EXPORT:PyInit_common build\temp.win-amd64-3.5\Release\talib\common.obj /OUT:build\lib.win-amd64-3.5\talib\common.cp35-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.5\Release\talib\common.cp35-win_amd64.lib common.obj : warning LNK4197: export 'PyInit_common' specified multiple times; using first specification Creating library build\temp.win-amd64-3.5\Release\talib\common.cp35-win_amd64.lib and object build\temp.win-amd64-3.5\Release\talib\common.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 build\lib.win-amd64-3.5\talib\common.cp35-win_amd64.pyd : fatal error LNK1120: 5 unresolved externals error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.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:\Users\yiugn_\Anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\yiugn_\AppData\Local\Temp\pip-build-of4wiq6k\ta-lib\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\yiugn_\AppData\Local\Temp\pip-heu3fbw7-record\install-record.txt --single-version-externally-managed --compile: C:\Users\yiugn_\Anaconda3\lib\site-packages\Cython\Distutils\old_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 build\lib.win-amd64-3.5 creating build\lib.win-amd64-3.5\talib copying talib\deprecated.py -> build\lib.win-amd64-3.5\talib copying talib\test_abstract.py -> build\lib.win-amd64-3.5\talib copying talib\test_data.py -> build\lib.win-amd64-3.5\talib copying talib\test_func.py -> build\lib.win-amd64-3.5\talib copying talib\test_stream.py -> build\lib.win-amd64-3.5\talib copying talib_init_.py -> build\lib.win-amd64-3.5\talib running build_ext skipping 'talib\common.c' Cython extension (up-to-date) building 'talib.common' extension creating build\temp.win-amd64-3.5 creating build\temp.win-amd64-3.5\Release creating build\temp.win-amd64-3.5\Release\talib C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\yiugn_\Anaconda3\lib\site-packages\numpy\core\include -Ic:\ta-lib\c\include -IC:\Users\yiugn_\Anaconda3\include -IC:\Users\yiugn_\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tctalib\common.c /Fobuild\temp.win-amd64-3.5\Release\talib\common.obj common.c C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:\ta-lib\c\lib /LIBPATH:C:\Users\yiugn_\Anaconda3\libs /LIBPATH:C:\Users\yiugn_\Anaconda3\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.10240.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64" ta_libc_cdr.lib /EXPORT:PyInit_common build\temp.win-amd64-3.5\Release\talib\common.obj /OUT:build\lib.win-amd64-3.5\talib\common.cp35-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.5\Release\talib\common.cp35-win_amd64.lib common.obj : warning LNK4197: export 'PyInit_common' specified multiple times; using first specification Creating library build\temp.win-amd64-3.5\Release\talib\common.cp35-win_amd64.lib and object build\temp.win-amd64-3.5\Release\talib\common.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 build\lib.win-amd64-3.5\talib\common.cp35-win_amd64.pyd : fatal error LNK1120: 5 unresolved externals error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe' failed with exit status 1120

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

Command "C:\Users\yiugn_\Anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\yiugn_\AppData\Local\Temp\pip-build-of4wiq6k\ta-lib\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\yiugn_\AppData\Local\Temp\pip-heu3fbw7-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\yiugn_\AppData\Local\Temp\pip-build-of4wiq6k\ta-lib\

yiugn avatar Nov 24 '16 08:11 yiugn

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

mrjbq7 avatar Nov 24 '16 14:11 mrjbq7

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

mrjbq7 avatar Nov 24 '16 14:11 mrjbq7

  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 avatar Nov 24 '16 22:11 yiugn

C:\Users\yiugn>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:\Users\yiugn\Anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\yiugn\AppData\Local\Temp\pip-build-fq2if3tu\ta-lib\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d C:\Users\yiugn\AppData\Local\Temp\tmp_eg4jubxpip-wheel- --python-tag cp35: running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-3.5 creating build\lib.win-amd64-3.5\talib copying talib\deprecated.py -> build\lib.win-amd64-3.5\talib copying talib\test_abstract.py -> build\lib.win-amd64-3.5\talib copying talib\test_data.py -> build\lib.win-amd64-3.5\talib copying talib\test_func.py -> build\lib.win-amd64-3.5\talib copying talib\test_stream.py -> build\lib.win-amd64-3.5\talib copying talib_init_.py -> build\lib.win-amd64-3.5\talib running build_ext building 'talib.common' extension creating build\temp.win-amd64-3.5 creating build\temp.win-amd64-3.5\Release creating build\temp.win-amd64-3.5\Release\talib C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\yiugn\Anaconda3\lib\site-packages\numpy\core\include -Ic:\ta-lib\c\include -IC:\Users\yiugn\Anaconda3\include -IC:\Users\yiugn\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tctalib/common.c /Fobuild\temp.win-amd64-3.5\Release\talib/common.obj common.c C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:\ta-lib\c\lib /LIBPATH:C:\Users\yiugn\Anaconda3\libs /LIBPATH:C:\Users\yiugn\Anaconda3\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.10240.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64" ta_libc_cdr.lib /EXPORT:PyInit_common build\temp.win-amd64-3.5\Release\talib/common.obj /OUT:build\lib.win-amd64-3.5\talib\common.cp35-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.5\Release\talib\common.cp35-win_amd64.lib common.obj : warning LNK4197: export 'PyInit_common' specified multiple times; using first specification Creating library build\temp.win-amd64-3.5\Release\talib\common.cp35-win_amd64.lib and object build\temp.win-amd64-3.5\Release\talib\common.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 build\lib.win-amd64-3.5\talib\common.cp35-win_amd64.pyd : fatal error LNK1120: 5 unresolved externals error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.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:\Users\yiugn\Anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\yiugn\AppData\Local\Temp\pip-build-fq2if3tu\ta-lib\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\yiugn\AppData\Local\Temp\pip-xucc65l0-record\install-record.txt --single-version-externally-managed --compile: running install running build running build_py creating build creating build\lib.win-amd64-3.5 creating build\lib.win-amd64-3.5\talib copying talib\deprecated.py -> build\lib.win-amd64-3.5\talib copying talib\test_abstract.py -> build\lib.win-amd64-3.5\talib copying talib\test_data.py -> build\lib.win-amd64-3.5\talib copying talib\test_func.py -> build\lib.win-amd64-3.5\talib copying talib\test_stream.py -> build\lib.win-amd64-3.5\talib copying talib_init_.py -> build\lib.win-amd64-3.5\talib running build_ext building 'talib.common' extension creating build\temp.win-amd64-3.5 creating build\temp.win-amd64-3.5\Release creating build\temp.win-amd64-3.5\Release\talib C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\yiugn\Anaconda3\lib\site-packages\numpy\core\include -Ic:\ta-lib\c\include -IC:\Users\yiugn\Anaconda3\include -IC:\Users\yiugn\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tctalib/common.c /Fobuild\temp.win-amd64-3.5\Release\talib/common.obj common.c C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:\ta-lib\c\lib /LIBPATH:C:\Users\yiugn\Anaconda3\libs /LIBPATH:C:\Users\yiugn\Anaconda3\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.10240.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64" ta_libc_cdr.lib /EXPORT:PyInit_common build\temp.win-amd64-3.5\Release\talib/common.obj /OUT:build\lib.win-amd64-3.5\talib\common.cp35-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.5\Release\talib\common.cp35-win_amd64.lib common.obj : warning LNK4197: export 'PyInit_common' specified multiple times; using first specification Creating library build\temp.win-amd64-3.5\Release\talib\common.cp35-win_amd64.lib and object build\temp.win-amd64-3.5\Release\talib\common.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 build\lib.win-amd64-3.5\talib\common.cp35-win_amd64.pyd : fatal error LNK1120: 5 unresolved externals error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe' failed with exit status 1120

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

Command "C:\Users\yiugn\Anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\yiugn\AppData\Local\Temp\pip-build-fq2if3tu\ta-lib\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\yiugn\AppData\Local\Temp\pip-xucc65l0-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\yiugn\AppData\Local\Temp\pip-build-fq2if3tu\ta-lib\

yiugn avatar Nov 24 '16 22:11 yiugn

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:

https://github.com/mrjbq7/ta-lib/issues/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.

mrjbq7 avatar Nov 24 '16 22:11 mrjbq7

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.

kristofmoens avatar Dec 15 '16 21:12 kristofmoens

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.0\VC\Bin\x86_amd64\c1.exe." failed with exit status 2"

MountainCountry avatar Feb 03 '17 22:02 MountainCountry

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-lib\c\include and C:\ta-lib\c\lib 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 https://github.com/mrjbq7/ta-lib/issues/127#issuecomment-267445729.

mrjbq7 avatar Feb 03 '17 22:02 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...

mrjbq7 avatar Feb 03 '17 22:02 mrjbq7

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-lib\c\make\cdr\win32\msvc
    • Build the Library nmake
  5. Then pip3 install ta-lib

stevens-tech avatar Feb 16 '17 03:02 stevens-tech

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.

thecfguy avatar Jun 17 '17 11:06 thecfguy

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

KabeerSinghBedi avatar Jun 27 '17 07:06 KabeerSinghBedi

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 d25e9dfe35ceecf71d888661c8f1c8bba805d3fd.

  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!

mrjbq7 avatar Jun 27 '17 15:06 mrjbq7

I followed “@gammaparadigm” comment and Re Build TA-Lib Library for 64 bit. It solved my problem. You can download already ReBuild TA-Lib from the link below.

https://github.com/afnhsn/TA-Lib_x64

afnhsn avatar Oct 10 '17 07:10 afnhsn

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

quaid281 avatar Apr 10 '18 19:04 quaid281

@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.

https://github.com/mrjbq7/ta-lib/issues/127#issuecomment-280222942

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

https://github.com/mrjbq7/ta-lib/issues/127#issuecomment-309210268

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.

mrjbq7 avatar Apr 10 '18 20:04 mrjbq7

@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 avatar May 01 '18 20:05 masdeseiscaracteres

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:\users\uzi\anaconda3\lib\site-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

quaid281 avatar May 04 '18 21:05 quaid281

@masdeseiscaracteres thanks a lot. Worked for me (Windows64, Python 3.7)

mayankrasu avatar May 22 '18 19:05 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.

mayankrasu avatar May 22 '18 19:05 mayankrasu