% вставить магию на ipython3

5841
wim

Я использую 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. 
13
Что вы получаете от `import Tkinter; печать (Tkinter) `? minrk 11 лет назад 0
`/ usr / lib / python2.7 / lib-tk / Tkinter.pyc` в 2.7, ошибка импорта в ipython3 wim 11 лет назад 0

2 ответа на вопрос

24
wim

minrk comment got me on the right track, and I've fixed it with the following package.

sudo apt-get install python3-tk

+1 это то же самое для python2.7: sudo apt-get установить python-tk chespinoza 10 лет назад 12
4
hello_there_andy

Чтобы быть более ясным: ответ wim также работает для python2.7, чтобы охватить все версии, просто запустите:

sudo apt-get install python-tk 

как ускользнул от Cespinoza

Похожие вопросы