Search code examples
pythonvisual-studio-codepipanaconda

How to install TA-Lib On vscode/windows(64bit)


I have installed Anaconda and then cd to my project folder and then I installed TALIB using

pip install TA_Lib-0.4.19-cp38-cp38-win_amd64.whl

When I run pip freeze on anaconda , talib can be found and runs without problem.

Anaconda

However when I use it on vscode, it seems to be a problem , the interpreter I have tried is the virtual env and conda interpreter on vscode.

Both keeps showing no module named talib because the module shown here is TA-Lib

Anaconda

Please advise.

Update : Ananconda Terminal Thank you


Solution

  • 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).

    enter image description here

    enter image description here

    Reference: Using Python environments in VS Code.