Visual Studio Code windows , Python Pandas . No module named pandas
I had a similar problem in VS Code. I was not able to find modules like Pandas, Selenium etc. Imports were underlined with a red colour.
Fixed the issue by changing the version of Python 3.7.3 64-bit
to version 3.8.1 64-bit
.
Procedure:
- Hit
Ctrl + Shift + P
- Select Python: Select Interpreter
- Choose the latest installed version of Python (no more red underlines)
It seems that the module pandas is installed in a virtual envorinment which you are not accessing via VS Code.
I'd suggest you to install pandas in default python as well via
pip install pandas
This way the VS Code will work it out just fine.
Else:
In VS Code console, activate the virtual enviornment in which you have installed the pandas module, and then run it. It should work