_tkinter Tclerror: Can't Find Package Tix
Solution 1:
I've tested this issue here (Ubuntu 12.04.5) and have got same error. Browsing over web found a debate about this feature's error. Here's a transcription part where I found the solution:
I am on Ubuntu 13.04 and when I see this error, I install tix-dev package and everything just works. I'd believe its similarly simple on OSX, but I have no clue about it. Also, make sure you're running Python 3.3 as that's the only version I'm developing/testing/using the GUI with.
I installed tix-dev
(apt-get install tix-dev
) and have tested with Python 2.7.3 and Python 3.2.3 and works.
Tests importing tkinter
in Python 3.3.3 and Tix
in 2.7.5 in OSX 10.9.5 have same issues with Ubuntu using ActiveTcl 8.6.3.1.
The problem is with Tcl lib Tix. The solution is to recompile the lib with 64 bit support.
The flags I used to compile were:
$ ./configure --enable-64bit --enable-threads --enable-framework --enable-aqua --enable-corefoundation
To enssure the were compiled to 64 bits platform run the following command
$ lipo -info libTix8.4.3.dylib
Non-fat file: libTix8.4.3.dylib is architecture: x86_64
After compile, copy the libTix8.4.3.dylib to path of libTix were installed by Tcl/Tk package.
Usually the path is /Library/Tcl/teapot/package/macosx10.5-i386-x86_64/lib/Tix8.4.3/libTix8.4.3.dylib
Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 232015, 02:52:03)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type"help", "copyright", "credits"or"license"for more information.
>>> from tkinter import tix
>>> root = tix.Tk()
>>>
Solution 2:
I has the same problem with Python 3.8 and pyinstaller 3.0
Solved by copying folder tix8.4.3 located in YOUR_PYTHON_INSTALL_PATH\Python38-32\Scripts\dist to the dist folder.
Solution 3:
You should import library using the syntax from tkinter.tix import Tk, ScrolledText
instead of from tkinter import scrolledtext
.
Post a Comment for "_tkinter Tclerror: Can't Find Package Tix"