Basically I want to build a minimal version of Python 3 (this will be running on a headless server, so no GUI, no mouse, no keyboard). The dependency on tk for most Python packages pulls in X and bunch of other UI things I dont want.
There's nothing in ./configure --help
that tells me how to switch off building with tk. And nothing in the README
file included with the source tarball either. Its been surprisingly hard to find info about this, so what kind of spell is needed ?
25.1. tkinter — Python interface to Tcl/Tk — Python 3.6.
Tkinter is a Python package which comes with many functions and methods that can be used to create an application. In order to create a tkinter application, we generally create an instance of tkinter frame, i.e., Tk(). It helps to display the root window and manages all the other components of the tkinter application.
Python Distributions with Tkinter The simplest method to install Tkinter in a Windows environment is to download and install either ActivePython 3.8 or 3.7 from here. Alternatively, you can create and activate a Conda environment with Python 3.7 or greater that is integrated with the latest version of Tkinter.
If the server you are trying to build Python on does not have tcl/tk installed, then Python will skip that portion during its build process.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With