我的问题:使用 pandas 模块的 read_clipboard() 函数时报错:
pyperclip could not find a copy/paste mechanism for your system
以下内容转译自 catinsunshine.blogspot.com
该办法解决的是导入 pyperclip 模块时报错的问题,但我的 read_clipboard() 函数报错信息与它一致,想来是函数内部使用了 pyperclip,试用该办法,得以解决问题。
正文
python 版本 3.5
导入 pyperclip 模块后,出现错误信息 '
Pyperclip could not find a copy/paste mechanism for your system.'
方案:安装 xsel 工具
$ sudo apt install xsel
然后重启 Python IDLE3, 导入 pyperclip,问题解决!
*****************************
安装 pip 和 pyperclip
$ sudo apt install python3-pip
$ sudo pip3 install pyperclip
结束