0

I just started using VS code to code in python and i have to choose the right extension to run and debug my code. By default i chose the recommanded one : Pylance.

My code is starting with :

import numpy as np

Though I made sure to use the command 'pip install numpy' from the terminal of VS code (which actually said that numpy was already downloaded), the problem is that Pylance seems to not recognise NumPy, it gives me the following error :

Import "numpy" could not be resolved

Should i download something else ? Or what extension should i use ?

rioV8
  • 24,506
  • 3
  • 32
  • 49
  • the error means `numpy` is not found in the Python interpreter VSC has selected, read the Python VSC doc to see how to select a different one – rioV8 Dec 12 '21 at 11:51
  • The default interpreter selected was indeed an old python version, i selected my last downloaded anaconda version and all works now thanks ! :) – eglantine_viala Dec 12 '21 at 12:18

0 Answers0