Al Sweigart's pyperclip library for Python attempts to provide cross-platform methods for interacting with the clipboard on a computer desktop. I and others have found that the .copy method does not work with our Linux desktops (mine is currently Ubuntu 18.04 LTS with the default Gnome Shell).
A workaround was identified gkotian in an issue opened on the project's Github repo.
Here's the snippet provided by gkotian, which I used in a project from Al's Automate the Boring Stuff with Python book.:
import os
text = 'The text to be copied to the clipboard.'
os.system("echo '{}' | xclip -selection clipboard".format(text))
This workaround requires installation of astrand's xclip program (installed on Ubuntu with "sudo apt install xclip").
Sorry for the late reply. I really wouldn't know where to begin to answer you question. As this is merely a (very) low traffic gist archive, it's unlikely anyone else will even see it. I'd suggest going to https://github.com/asweigart/pyperclip/issues to see if anyone there can help. Also, it looks like pyperclip is no longer supported, so you might want to look for an alternative like this: https://github.com/NikitaBeloglazov/clipman.