I am rather new to programming. Right now, I am using vsc to code on OS X (the same error occurs in Terminal). But for whatever reason, I can’t use my modules in python; I tried different ones, like pandas or numpy. I always get the same error:
ModuleNotFoundError: No module named ‘pandas’
I tried to update and reinstall the modules, pip, and python. Now I am out of ideas. Does anyone have an Idea on how to fix that?
I tried to import modules:
import pandas as pd
But got the error:
ModuleNotFoundError: No module named ‘pandas’
3
Answers
Try to run
pip list
in your shell and see ifpandas
is printed.If not, it means that it has not been installed. See there for instalation instructions.
See also the VS Code doc about Python and selection of interpreters.
you can use
in your case
and then to verify if your panda is installed well you can check it by :
you will have an output like this :
then you can import your panda library
Have you checked whether you chose the correct python Interpreter?
Use shortcuts Ctrl+Shift+P and search for
"Python:Select Interpreter"
to check it.