skip to Main Content

I am currently working in VSCode and attempting to import various libraries into my file. I am currently using the interpreter image of interpreter. The remainder of my code is shown remainder of code. I do not understand why my numpy is unable to be imported.

2

Answers


  1. Do Ctrl + Shift + P, then in the pop-up type select python interpreter and choose the same python version where you installed numpy package.

    Login or Signup to reply.
  2. Use the following code to print the current interpreter environment,

    import sys
    print(sys.executable)
    

    Copy the interpreter path and install numpy with

     C:WorkSpacepytest10.venvScriptspython.exe -m pip install numpy
    

    Modify C:WorkSpacepytest10.venvScriptspython.exe to the path you get

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search