% Einfügen der Zauberfunktion auf ipython3

5890
wim

Ich benutze ipython3, auf Ubuntu mit installiert apt-get. Ich kann die Paste-Magic-Funktion nicht verwenden, sie beschwert sich über das Fehlen Tkinter. Aber ich habe Tkinterund das gleiche funktioniert auf ipython (2). Was gibt?

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
Was bekommen Sie von `import Tkinter; Druck (Tkinter) `? minrk vor 11 Jahren 0
`/ usr / lib / python2.7 / lib-tk / Tkinter.pyc` am 2.7, Fehler beim Import von ipython3 wim vor 11 Jahren 0

2 Antworten auf die Frage

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 ist dasselbe für python2.7: sudo apt-get install python-tk chespinoza vor 10 Jahren 12
4
hello_there_andy

Um zusätzliche klar: wim ‚s Antwort auch für python2.7 arbeitet, um alle Versionen zu decken einfach auszuführen:

sudo apt-get install python-tk 

wie von Cespinoza entgangen