是否无法在aws(amazonwebservice)ubuntu18.04实例上使用剪贴板?

2024-04-24 23:32:45 发布

您现在位置:Python中文网/ 问答频道 /正文

我一直在尝试使用python库,它被称为pyperclip 在AWS EC2 Ubuntu18.04上使用jupyter笔记本电脑。 当我导入pyperclip并测试其copy()函数是否正常工作时

import pyperclip pyperclip.copy(2)

我不断地犯这个错误

PyperclipException: 
Pyperclip could not find a copy/paste mechanism for your system.
For more information, please visit https://pyperclip.readthedocs.io/en/latest/introduction.html#not-implemented-error 

我搜索了几天,安装了所有似乎需要的东西。 (xclip、xsel、pygi和PyQt5) 但它仍然不起作用

有人知道怎么处理吗


Tags: 函数importaws错误notjupyterfindec2