Home > Net >  My VS code running button cannot run python program(always missing imports but they are in my anacon
My VS code running button cannot run python program(always missing imports but they are in my anacon

Time:01-24

I have anaconda installed in my user directory.

And I can run python program normally in VS code terminal.

But if I use the run button right upper corner it always remind me imports are missing. enter image description here

Didn't find a similar problem online.

I was expecting that click the run button is just equivalent as “python program.py" command

I already add anaconda to the path, but look like anaconda is different than python? Also this anaconda is installed by Pycharm if I remember right, will this have effect?

CodePudding user response:

Have you choose the correct interpreter?

Use shortcuts "Ctrl Shift P" and type "Python: Select Interpreter" to choose the correct interpreter.

  • Related