Problem using the pyperclip library on VSCode

135 Views Asked by At

I need my program to copy some text to the clipboard. For that, I thought of using the pyperclip library. But every time I run my code an error appears "Pyperclip could not find a copy/paste mechanism for you system."

I´ve experimented doing a simple program of the likes:

import pyperclip

name = input("Enter your name: ")

pyperclip.copy(name)

To see if the problem was because of my code, but it turns out the problem still appears. So it must be because of the system/environment. I´m looking for any tips on changing something on VSCode too see if the problem stops.

The error message

I´ve tried logging into VSCode on both PC and Mac and the problem still occurs.

0

There are 0 best solutions below