pythonnumpycompatibility

Numpy doesn't functioning in visual studio code


I installed numpy library version 1.25.x because my python version is 3.11.3(via anaconda) but in visual studio code program the command like np.array() does not excute. Is it compatible issue or something else?

I've upgraded my pip and then install another version of numpy (version 2.0.0) but the problem wasn't go away, then I searched for compatible version and find out version 1.25.x is compatible with python 3, but the issue still there. so can someone please tell me what should I do?


Solution

  • Assuming that you're running file in vscode...

    You need to select Anaconda environment as your default environment in vscode.

    In order to do that: