I've a problem regarding the installation of TA-Lib, I've followed both the documentation and this tutorial (https://blog.quantinsti.com/install-ta-lib-python/) but both don't seem to work. The module is present but when I try to check in vscode if the import works it just doesn't. But it does work on anaconda prompt so I don't know what the problem might be here.
Asked
Active
Viewed 1,292 times
-1
-
What is the error code when you try to import it? Are you using a virtual environment? – Tom McLean Nov 17 '21 at 17:41
-
i've screened the error, it is in the vscode link. I can copy paste it here: >>> import talib Traceback (most recent call last): File "
", line 1, in – Pogus Nov 17 '21 at 17:42ModuleNotFoundError: No module named 'talib' -
about the virtual enviroment I honestly don't know, though I'm pretty sure I'm using Python: Select Interpreter -> Python 64-bit ('base': conda) which is the recommended one, how this info helps @TomMcLean ! – Pogus Nov 17 '21 at 17:44
-
always put full error message (starting at word "Traceback") in question (not in comments) as text (not screenshot, not link to external portal). There are other useful information. – furas Nov 17 '21 at 23:37
-
you may have common problem - you may have two Pythons installed - and module can be installed in one Python but you run code with other Python. Pythons don't shares modules. You can used in Python `print( sys.executable() )` to get `/full/path/to/python` and later use it to install modules `/full/path/to/python -m pip install ...` – furas Nov 17 '21 at 23:39
2 Answers
0
can you create a virtual environment and install TA LIB inside the virtual environment and open the folder in vs code and run it. I think that should work.

Vikingslord
- 86
- 10
-
Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Nov 17 '21 at 18:26
0
From the bottom-left of the VSCode, you can get which python interpreter you have selected.
From the picture you have provided, you have installed the talib
package in the conda:base
environment. So you should select the conda:base
environment as the python interpreter.

Steven-MSFT
- 7,438
- 1
- 5
- 13
-
I did but it doesn't work for some reason.. here the screenshot https://imgur.com/eCMjREO – Pogus Nov 18 '21 at 09:31
-
@Pogus You have not activated the environment in the terminal. After you activated it, it will start with `(base)` – Steven-MSFT Nov 18 '21 at 09:48
-
@Pogus Can you create a new environment with the shortcut of ctrl+shift+` ? – Steven-MSFT Nov 18 '21 at 09:49
-
ctrl+shift+` doesn't work.. but I've tried to install TA LIB in a virtual enviroment using this tutorial https://www.youtube.com/watch?v=Wuuiga0wKdQ and it didn't fix much @Steven-MSFT ! – Pogus Nov 18 '21 at 16:20