Python 在aws(amazon web service)ubuntu18.04实例上使用剪贴板是否不可能?

Python 在aws(amazon web service)ubuntu18.04实例上使用剪贴板是否不可能?,python,amazon-web-services,clipboard,ubuntu-18.04,pyperclip,Python,Amazon Web Services,Clipboard,Ubuntu 18.04,Pyperclip,我一直在尝试使用python库,它被称为pyperclip 在AWS EC2 Ubuntu18.04上使用jupyter笔记本电脑。 当我导入pyperclip并测试其copy()函数是否正常工作时 导入pyperclip pyperclip.copy(2) 我不断地犯这个错误 PyperclipException: Pyperclip could not find a copy/paste mechanism for your system. For more information, pl

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

导入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) 但它仍然不起作用


有人知道如何处理这个问题吗?

我想你需要在机器上安装某种剪贴板工具,试着运行“apt get install xclip”我已经安装了xclip,但是当我检查xclip版本时,我发现了这个错误。root@ip-172-31-20-72:~#xclip版本错误:无法打开显示:(null)抱歉,没有其他建议,只是猜测:)有解决方案吗?我想您需要在机器上安装某种剪贴板工具,尝试运行“apt get install xclip”我已经安装了xclip,但当我检查xclip版本时,我遇到了此错误。root@ip-172-31-20-72:~#xclip版本错误:无法打开显示:(null)抱歉,没有其他建议,只是猜测:)有解决方案吗?