pythonvisual-studio-codepyperclip

VS code pyperclip Import "pyperclip" could not be resolved


I am trying to use pyperclip for a python course I am doing and it tells me to import pyperclip, but when I import it VS code says Import "pyperclip" could not be resolved even though I went into the terminal and installed it my python version is 3.10.6 64bit does anyone know how to fix this?

pip install pyperclip

Solution

  • Follow the steps below to choose an interpreter

    1. Open the command palette with Ctrl+Shift+P
    2. Search for Python:Select Interpreter
    3. Choose the correct interpreter

    It is recommended to use a virtual environment

    use the following command in the vscode terminal:

    Virtual environments can help you manage using different python versions and using different packages.