Tkinter 包在 pypy3(Windows 10) 上运行不佳
Tkinter Package doesn't work well on pypy3(Windows 10)
最近在电脑上安装了pypy3.6。我试着 运行 tkinter
像这样:
Python 3.6.9 (1608da62bfc7, Dec 23 2019, 12:38:24)
[PyPy 7.3.0 with MSC v.1911 32 bit] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>> import tkinter
>>>> root = tkinter.Tk()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "D:\pypy3.6\lib-python\tkinter\__init__.py", line 2023, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
File "D:\pypy3.6\lib_pypy\_tkinter\__init__.py", line 31, in create
interactive, wantobjects, wantTk, sync, use)
File "D:\pypy3.6\lib_pypy\_tkinter\app.py", line 157, in __new__
Tcl_AppInit(self)
File "D:\pypy3.6\lib_pypy\_tkinter\app.py", line 49, in Tcl_AppInit
app.raiseTclError()
File "D:\pypy3.6\lib_pypy\_tkinter\app.py", line 171, in raiseTclError
tklib.Tcl_GetStringResult(self.interp)).decode('utf-8'))
_tkinter.TclError: Can't find a usable init.tcl in the following directories:
D:/pypy3.6/lib_pypy/lib/tcl8.5 D:/lib/tcl8.5 D:/lib/tcl8.5 D:/library D:/library D:/tcl8.5.2/library D:/tcl8.5.2/library
这可能意味着 Tcl 没有正确安装。
我的环境变量(部分)
当我在我的 CPython 3.8.1 上试用时,它运行良好。
我认为 d:\pypy3.6\tcl\tcl8.5
库应该重命名为 d:\pypy3.6\lib\tcl
,d:\pypy3.6\tcl\tk8.5
应该重命名为 d:\pypy3.6\lib\tk
。如果这样做,是否解决了问题?
这是 pypy 压缩文件的问题。它是 fixed,将成为下一个版本的一部分。
最近在电脑上安装了pypy3.6。我试着 运行 tkinter
像这样:
Python 3.6.9 (1608da62bfc7, Dec 23 2019, 12:38:24)
[PyPy 7.3.0 with MSC v.1911 32 bit] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>> import tkinter
>>>> root = tkinter.Tk()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "D:\pypy3.6\lib-python\tkinter\__init__.py", line 2023, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
File "D:\pypy3.6\lib_pypy\_tkinter\__init__.py", line 31, in create
interactive, wantobjects, wantTk, sync, use)
File "D:\pypy3.6\lib_pypy\_tkinter\app.py", line 157, in __new__
Tcl_AppInit(self)
File "D:\pypy3.6\lib_pypy\_tkinter\app.py", line 49, in Tcl_AppInit
app.raiseTclError()
File "D:\pypy3.6\lib_pypy\_tkinter\app.py", line 171, in raiseTclError
tklib.Tcl_GetStringResult(self.interp)).decode('utf-8'))
_tkinter.TclError: Can't find a usable init.tcl in the following directories:
D:/pypy3.6/lib_pypy/lib/tcl8.5 D:/lib/tcl8.5 D:/lib/tcl8.5 D:/library D:/library D:/tcl8.5.2/library D:/tcl8.5.2/library
这可能意味着 Tcl 没有正确安装。
我的环境变量(部分)
当我在我的 CPython 3.8.1 上试用时,它运行良好。
我认为 d:\pypy3.6\tcl\tcl8.5
库应该重命名为 d:\pypy3.6\lib\tcl
,d:\pypy3.6\tcl\tk8.5
应该重命名为 d:\pypy3.6\lib\tk
。如果这样做,是否解决了问题?
这是 pypy 压缩文件的问题。它是 fixed,将成为下一个版本的一部分。