我正在使用ipython3
,安装在 Ubuntu 上apt-get
。我无法使用粘贴魔法函数,它抱怨缺少Tkinter
。但我有,Tkinter
并且同样的事情在 ipython (2) 上运行良好。发生了什么?
Python 3.2.3 (default, Oct 19 2012, 19:53:16)
Type "copyright", "credits" or "license" for more information.
IPython 0.13.1.rc2 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: %paste
ERROR: Getting text from the clipboard on this platform requires Tkinter.
答案1
minrk 的评论让我走上了正确的轨道,我已经用以下包修复了它。
sudo apt-get install python3-tk