运行课件代码报错_tkinter.TclError: invalid command name "tcl_findLibrary"

@Robin_TY
运行fractal_tree.py, 报如下错误,电脑之前有装过2.7x的python版本,在python2.7x可以是可以运行turtle.forward(40)
 
 
Traceback (most recent call last):  File "C:/Workdocument/River/Python/Learn/Test.py", line 35, in <module>
    main()
  File "C:/Workdocument/River/Python/Learn/Test.py", line 29, in main
    turtle.left(90)
  File "<string>", line 6, in left
  File "C:\ProgramData\Anaconda3\lib\turtle.py", line 3812, in __init__
    Turtle._screen = Screen()
  File "C:\ProgramData\Anaconda3\lib\turtle.py", line 3662, in Screen
    Turtle._screen = _Screen()
  File "C:\ProgramData\Anaconda3\lib\turtle.py", line 3678, in __init__
    _Screen._root = self._root = _Root()
  File "C:\ProgramData\Anaconda3\lib\turtle.py", line 434, in __init__
    TK.Tk.__init__(self)
  File "C:\ProgramData\Anaconda3\lib\tkinter\__init__.py", line 2020, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: invalid command name "tcl_findLibrary"

Process finished with exit code 1
 

River7wk

赞同来自:

问题已解决, 是我的环境变量中有其他程序指定TCL 的lib,删了,重启了下电脑就好了!  

要回复问题请先登录注册