Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
Build Python without OSX Tkinter Framework auto detection
diff --git a/ b/
index 6b47451..51cc779 100644
--- a/
+++ b/
@@ -1702,9 +1702,9 @@ class PyBuildExt(build_ext):
# AquaTk is a separate method. Only one Tkinter will be built on
# Darwin - either AquaTk, if it is found, or X11 based Tk.
platform = self.get_platform()
- if (platform == 'darwin' and
- self.detect_tkinter_darwin(inc_dirs, lib_dirs)):
- return
+ # if (platform == 'darwin' and
+ # self.detect_tkinter_darwin(inc_dirs, lib_dirs)):
+ # return
# Assume we haven't found any of the libraries or include files
# The versions with dots are used on Unix, and the versions without
@@ -1793,6 +1793,8 @@ class PyBuildExt(build_ext):
if platform != "cygwin":
+ include_dirs.append("/usr/local/include")
+ added_lib_dirs.append("/usr/local/lib")
ext = Extension('_tkinter', ['_tkinter.c', 'tkappinit.c'],
define_macros=[('WITH_APPINIT', 1)] + defs,
include_dirs = include_dirs,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.