Ubuntu系统下,在Python中使用pyperclip模块时遇到QFileSystemWatcher::removePaths: list is empty提示怎么破?

时间:2024-03-22 08:06:43

昨晚在Ubuntu系统下,我发现在Python中使用pyperclip模块的copy函数时会提示QFileSystemWatcher::removePaths: list is empty,并且字符串也没有成功地复制到剪贴板上

Ubuntu系统下,在Python中使用pyperclip模块时遇到QFileSystemWatcher::removePaths: list is empty提示怎么破?

Ubuntu系统下,在Python中使用pyperclip模块时遇到QFileSystemWatcher::removePaths: list is empty提示怎么破?

后来我到pyperclip官网找到文档,https://pyperclip.readthedocs.io/en/latest/

发现只要按照文档所说的把这两个玩意儿安装上就可以了

sudo apt-get install xsel
sudo apt-get install xclip

Ubuntu系统下,在Python中使用pyperclip模块时遇到QFileSystemWatcher::removePaths: list is empty提示怎么破?

并且字符串也成功地被复制到剪贴板上