【Python问题】Pyperclip could not find a copy/paste mechanism for your system

ubuntu需要安装几个工具

错误如下

anaconda3/envs/cooper/lib/python3.9/site-packages/pandas/io/clipboard/__init__.py:627: in lazy_load_stub_copy
    return copy(text)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pandas.io.clipboard.init_no_clipboard.<locals>.ClipboardUnavailable object at 0x7f25eb685fa0>, args = ('abcd...',), kwargs = {}

    def __call__(self, *args, **kwargs):
>       raise PyperclipException(EXCEPT_MSG)
E       pandas.io.clipboard.PyperclipException: 
E           Pyperclip could not find a copy/paste mechanism for your system.
E           For more information, please visit
E           https://pyperclip.readthedocs.io/en/latest/#not-implemented-error

anaconda3/envs/cooper/lib/python3.9/site-packages/pandas/io/clipboard/__init__.py:287: PyperclipException

安装xsel工具

(cooper) cooper@cooper:~$ sudo apt-get install xsel
[sudo] password for cooper: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  xsel
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 20.6 kB of archives.
After this operation, 73.7 kB of additional disk space will be used.
Get:1 http://cn.archive.ubuntu.com/ubuntu xenial/universe amd64 xsel amd64 1.2.0-2 [20.6 kB]
Fetched 20.6 kB in 0s (26.4 kB/s)
Selecting previously unselected package xsel.
(Reading database ... 255097 files and directories currently installed.)
Preparing to unpack .../xsel_1.2.0-2_amd64.deb ...
Unpacking xsel (1.2.0-2) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up xsel (1.2.0-2) ...

安装xclip工具

(cooper) cooper@cooper:~$ sudo apt-get install xclip
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  xclip
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 17.0 kB of archives.
After this operation, 72.7 kB of additional disk space will be used.
Get:1 http://cn.archive.ubuntu.com/ubuntu xenial/universe amd64 xclip amd64 0.12+svn84-4 [17.0 kB]
Fetched 17.0 kB in 0s (21.6 kB/s)
Selecting previously unselected package xclip.
(Reading database ... 255103 files and directories currently installed.)
Preparing to unpack .../xclip_0.12+svn84-4_amd64.deb ...
Unpacking xclip (0.12+svn84-4) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up xclip (0.12+svn84-4) ...
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值