Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python tk framework

I have python code that generates the following error:

objc[36554]: Class TKApplication is implemented in both /Library/Frameworks/Tk.framework/Versions/8.5/Tk and /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk. One of the two will be used. Which one is undefined.

objc[36554]: Class TKMenu is implemented in both /Library/Frameworks/Tk.framework/Versions/8.5/Tk and /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk. One of the two will be used. Which one is undefined.

objc[36554]: Class TKContentView is implemented in both /Library/Frameworks/Tk.framework/Versions/8.5/Tk and /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk. One of the two will be used. Which one is undefined.

objc[36554]: Class TKWindow is implemented in both /Library/Frameworks/Tk.framework/Versions/8.5/Tk and /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk. One of the two will be used. Which one is undefined.

Some of my Tk extension libraries are linking against /System/Library/Frameworks instead of /Library/Frameworks when they are being compiled, I know The install_name_tool tool can re-link a binary to the correct framework, but what exactly do I need to type into Terminal in order to fix this problem?

like image 482
terence vaughn Avatar asked Jun 26 '13 18:06

terence vaughn


1 Answers

I am not completely aware how to relink the libraries but I found this blog post. That deals with the same issue. In that case everything was cause due to ActiveTcl messing with the already installed System Framework.

He ended up simply removing the non-System version. Its a drastic solution but it might work.

cd /Library/Frameworks
rm -r Tk.framework
rm -r Tcl.framework

You could also move the Frameworks somewhere else first for testing purposes and if you break something restore them later.

http://michaelwelburn.com/2013/06/07/python-error-conflicting-tk-libraries-and-activetcl/

like image 53
cwoebker Avatar answered Sep 28 '22 18:09

cwoebker