Перейти к содержимому

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

13

Я использую 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. 
5 962 просмотра
wim спросил 13 лет назад
W 1 419

2 ответа

24
Принятый ответ

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 · 13 лет назад · 12
wim ответил 13 лет назад
W 1 419
4

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

sudo apt-get install python-tk 

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

hello_there_andy ответил 11 лет назад
H 254