git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SOLVED] Re: Installing Python 3.8.3 with tkinter


On 7/22/20 12:20 PM, Klaus Jantzen wrote:
> Hi,
>
> Trying to install Python 3.8.3 with tkinter I run configure with the 
> following options
>
> ./configure --enable-optimizations --with-ssl-default-suites=openssl 
> --with-openssl=/usr/local --enable-loadable-sqlite-extensions 
> --with-pydebug --with-tcltk-libs='-L/opt/ActiveTcl-8.6/lib/tcl8.6' 
> --with-tcltk-includes='-I/opt/ActiveTcl-8.6/include'
>
> Running Python gives the following information
>
> Python 3.8.3 (default, Jul 22 2020, 11:52:15)
> [GCC 8.3.0] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import sqlite3
> >>> import tkinter
> Traceback (most recent call last):
> ? File "<stdin>", line 1, in <module>
> ? File "/usr/local/lib/python3.8/tkinter/__init__.py", line 36, in 
> <module>
> ??? import _tkinter # If this fails your Python may not be configured 
> for Tk
> ModuleNotFoundError: No module named '_tkinter'
> >>>
>
> Obviously there is something wrong with my configure options.
>
> How do that correctly?
>
> Thanks for any help.
>
> K.D.J.
>
>
In my post I forgot to mention that I am running PY under Debian Buster.

As suggested by Ned Deily I switched to PY 3.8.5

After some more research in the internet I found that the tcl/tk 
libraries have automaticalle been installed during the Buster installation.

For automatically including tkinter during the PY installation one needs 
also the 'tk-dev toolkit'.

With that I did not need the options 
'--with-tcltk-libs'/'--with-tcltk-includes'

After the installation of PY 3.8.5 I can import tkinter.

Thank you very much for your replies.

K.D.J.