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 link / System / Library / Frameworks instead of / Library / Frameworks when they compile, I know. The install_name_tool tool can reconfigure the binary to the correct structure, but what exactly do I need to enter in Terminal to fix this problem?

+6
source share
2 answers

I don’t quite understand how to rewrite libraries, but I found this blog post. This concerns the same problem. In this case, everything was caused by the interaction of ActiveTcl with the already installed System Card.

In the end, he simply uninstalled a version other than the system. This is a decisive decision, but it can work.

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

You can also move Frameworks somewhere forward for testing, and if you break something, restore them later.

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

+1
source

I don’t think that simply removing frameworks is the best way to deal with this problem. If the infrastructure is actually related to installing ActiveTcl, other files and links should probably be cleaned up. ActiveState provides an uninstall script to clear everything; where to find it and how to use it is indicated in the ActiveTcl User Guide . Note that the location of the script depends on the version of OS X.

If you have already deleted the frameworks and deleted the script with them, you can look in / usr / local / bin for any executable files (or outdated links to executable files) that ActiveTcl places (for example, wish , tclsh and tkcon ). To find something there that references remote frameworks, you can use something like ls -l | grep Tcl ls -l | grep Tcl or ls -l | grep Tk ls -l | grep Tk (but make sure that any links that you find and are about to remove belong to the places of third-party / library objects, and not to / System / Library).

0
source

Source: https://habr.com/ru/post/948159/


All Articles