TA–Lib is an open-source library widely used by trading software developers requiring to perform technical analysis (TA) of financial market data. It is in development since 1999 making it extremely stable and time tested.
You tried running this in the Terminal and resulted to an error:
pip install TA-lib
Here are the steps in order to fix the issue.
Step 1. Check the python version by running
python --version
Take note of the version because this will be needed in Step 2. In this tutorial, the version is 3.9 (encircled in screenshot above)
Step 2. Go to the Unofficial Windows Binaries for Python Extension Packages https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib Locate the “cpXX” that matches your python version, removing the dot. For example, 3.9 “cp39”
Step 3. Now you are down to only 2 versions to choose from.
- TA_Lib-0.4.23-cp39-cp39-win_amd64.whl
- TA_Lib-0.4.23-cp39-cp39-win32.whl
Find out if you’re running a 32-bit or 64-bit version of Windows. If you’re not sure what kind of machine you have, open Command Prompt or PowerShell and enter: systeminfo | find "System Type"
If it is 64-bit, download the TA_Lib-XXXXXXXX-win_amd64.whl. Otherwise, download the TA_Lib-XXXXXXXX-win32.whl
Step 4. In the Terminal again, run pip install and the absolute file path of the downloaded wheel in step 3.pip install "C:\Users\TechieJackie\Downloads\TA_Lib-0.4.23-cp39-cp39-win_amd64.whl"
A message will be displayed confirming successful installation.
Processing c:\users\techiejackie\downloads\ta_lib-0.4.23-cp39-cp39-win_amd64.whl
Installing collected packages: TA-Lib
Successfully installed TA-Lib-0.4.23
This should fix the error in installing TA-lib wrapper for Windows. You can run in Terminal again without errors:
pip install TA-lib
Cheers!