Visual Studio Code windows , Python Pandas . No module named pandas

Davdei picture Davdei · Sep 18, 2018 · Viewed 38.8k times · Source

I set the variables for Env. All necessary modules for Pandas operation are installed by pip. I wanted to run the code to display it in "Output". I run with: Alt + CTRL + N(or right click -> Run code).

enter image description here

In output returns the message:

enter image description here

But when I run in the terminal (right click -> Run Python File in Terminal), the code works correctly.

enter image description here

I would like the code to run correctly in output(right click -> Run code), not in the terminal. Any suggestions?

Answer

Feras picture Feras · Feb 1, 2019

@Davdei It is good practice to work with a virtual environment, so you can test against different versions of Python. To get the list of available Python interpreter use (⇧⌘P) on Mac or alternatively, you can click the status bar click the status bar