In VsCode I have activated .venv environment in which I can see pandas module confirmed with pip show pandas
command and I still see error: ModuleNotFoundError: No module named 'pandas'
(.venv) C:\PythonWs\testVsCodeNotebook>python --version Python 3.10.8
How I can resolve this?
John Gordon points out that VsCode uses the wrong path to the python interpretation (.venv environment was created from VsCode palette and activated from command line). How I can fix it in VsCode?
PS. I put import pandas as pd;
in a standalone python file and it works without any problem.
CodePudding user response:
When you use jupyter notebook, you need to choose kernel, click the following button in picture:
You can also read document for more details.