Thanks to @Jill Cheng
Basically the answer is tricky.
a. In the anaconda environment make sure you check the python version
python3 --version
b. Go to https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib and download the suitable package . Since I am using python 3.9.1 and I am using 64 bits window. So I downloaded this file TA_Lib‑0.4.19‑cp39‑cp39‑win_amd64.whl
c. Then I ran python3 -m pip install {filename on b}
python3 -m pip install TA_Lib‑0.4.19‑cp39‑cp39‑win_amd64.whl
d. Check if talib is installed. Run
python3
e. Run the following command
import talib
f. If there is no problem , then you can put in on py file. For an example my py file is example.py
#example.py
import numpy
import talib
close = numpy.random.random(100)
upper, middle, lower = talib.BBANDS(close, matype=MA_Type.T3)
print(middle)
g. You should be able to see middle printed out once you run python3 example.py.
Thanks to @Jill Cheng
Basically the answer is tricky.
a. In the anaconda environment make sure you check the python version
python3 --version
b. Go to https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib and download the suitable package . Since I am using python 3.9.1 and I am using 64 bits window. So I downloaded this file TA_Lib‑0.4.19‑cp39‑cp39‑win_amd64.whl
c. Then I ran python3 -m pip install {filename on b}
python3 -m pip install TA_Lib‑0.4.19‑cp39‑cp39‑win_amd64.whl
d. Check if talib is installed. Run
python3
e. Run the following command
import talib
f. If there is no problem , then you can put in on py file. For an example my py file is example.py
#example.py
import numpy
import talib
close = numpy.random.random(100)
upper, middle, lower = talib.BBANDS(close, matype=MA_Type.T3)
print(middle)
g. You should be able to see middle printed out once you run python3 example.py.
Please use the command "python --version" in the anaconda terminal and the terminal in VSCode to check whether the Python you are currently using is consistent.
When we are in different Python environments in VSCode, the modules are stored in different locations. Therefore, we need to select the Python environment in which the module "talib" is installed in VSCode (please choose the same Python used in anaconda).


Reference: Using Python environments in VS Code.
damn this is the most frustrating thing ever. How do I install TA-LIB on windows/vscode ?
python version 3.8
pip version 20.3.3
OS: 64 bit windows 10
I have installed Anaconda and then cd to my project folder and then I installed TALIB using the following command
pip install TA_Lib-0.4.19-cp38-cp38-win_amd64.whl
When I run pip freeze on anaconda , TA-LIB can be found and runs without problem. https://i.stack.imgur.com/hU4OT.png
However when I use it on vscode, it seems to be a problem , the interpreter I have tried arethe virtual env and conda interpreter on vscode.
Both keeps showing no module named talib because the module shown here is TA-Lib
https://i.stack.imgur.com/WH3HC.png
Please advise.
Thank you
TA-Lib Installation error (Windows 11 64 bit, Python 3.11 64 bit, IDE Pycharm), Visual Studio 2022
python - hello,any advice for adding TA-Lib - Stack Overflow
visual studio code - unable to import TA-Lib python - Stack Overflow
No Method list in VSCODE
Videos
» pip install TA-Lib