鍍金池/ 問答/Python/ pip3 install tkinker 失敗?

pip3 install tkinker 失?。?/h1>

我的是mac系統(tǒng),使用pip3安裝,安裝的時候報了如下的錯:

**Could not find a version that satisfies the requirement tkinker (from versions: )
No matching distribution found for tkinker**
有哪位大神指教一下如何解決,網(wǎng)上查了好多帖子,依舊沒有解決。

回答
編輯回答
故林

tkinter吧?
這是內(nèi)置模塊,可以直接使用,不需要安裝

try:
    from tkinter import *
except ImportError:  #Python 2.x
    PythonVersion = 2
    from Tkinter import *
    from tkFont import Font
    from ttk import *
    from tkMessageBox import *
    import tkFileDialog
else:  #Python 3.x
    PythonVersion = 3
    from tkinter.font import Font
    from tkinter.ttk import *
    from tkinter.messagebox import *
2017年7月16日 14:24
編輯回答
野橘
pip3 install python3-tk
2018年2月25日 19:42