4

TA-Lib windows distribution from here https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib, but only support to 3.10. How to install Ta-lib with python 3.11 in Windows?

Instructions from the README for installing on 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 or later)
    • 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

But then:

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
Dev-iL
  • 23,742
  • 7
  • 57
  • 99
zgpnuaa
  • 51
  • 1
  • 3
  • Please [edit] your question and post the [*full text* of any errors or tracebacks](https://meta.stackoverflow.com/q/359146). – MattDMo Feb 16 '23 at 15:08

4 Answers4

2

The only solution that worked for me is this: https://github.com/afnhsn/TA-Lib_x64

  1. Download "ta-lib x64.zip" from github above. Extract zip file to C:\, so it looks like this C:\ta-lib
  2. Download Visual C++ build tools 2022: https://aka.ms/vs/17/release/vs_buildtools.exe
  3. Install Visual C++ build tools: https://stackoverflow.com/a/54136652/10997732
  4. Install ta-lib: pip install ta-lib
m3los
  • 180
  • 1
  • 8
0

You have to find the correct wheel file for TA-Lib and Python 3.11. I currently am trying to find the same file. 3.10 is the latest I have seen

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

0

This works

python3 -m pip install TA-Lib
Mustafa Al Ajmi
  • 63
  • 1
  • 1
  • 5
0

It should be noted that installing a wheel made for an older Python version (e.g. 3.10), but the correct architecture (e.g. win64) is probably going to work for you. This can be done using pip install <path to .whl file>. The main downside of this approach is that the prebuilt wheel you're using could be somewhat outdated.

Here's what I did to build it myself on a "clean" system:

  1. Install the following 3 components from the VS2022 installer: enter image description here

  2. Follow the instructions for building using nmake quoted in the OP. [src]

  3. pip install TA-Lib

If you don't want to do any of that, I've uploaded my built wheel here.

Dev-iL
  • 23,742
  • 7
  • 57
  • 99