corpnewt / ProperTree

Cross platform GUI plist editor written in python.
BSD 3-Clause "New" or "Revised" License
2.64k stars 434 forks source link

[Solution] Simple macOS Monterey ProperTree fix #119

Open Overc1ocker opened 2 years ago

Overc1ocker commented 2 years ago

Please note: The solution found in Readme.md also works.

  1. Install Python 3 for macOS Python 3.10 Mac

  2. Launch terminal

  3. Run this command cd '' && '/usr/local/bin/python3' '/Users/(you)/Downloads/ProperTree/ProperTree.command'

Make sure to replace (you) with your username. Use the whoami command if you're unsure

If you have downloaded Propertree somewhere else, please edit '/Users/(you)/Downloads/ProperTree/ProperTree.command' accordingly

Stooovie commented 2 years ago

I'm getting File "/Users/stooovie/Downloads/ProperTree/ProperTree.command", line 9 NL=$'\n' ^ SyntaxError: invalid syntax

The path is correct

corpnewt commented 2 years ago

Apple no longer ships python with macOS as of version 12.3 (which is only in beta currently), and in response to that, I've migrated a number of my more popular repos to leverage bash starter scripts.

If you have python 3 installed locally, you can try double-clicking the ProperTree.command starter, which will attempt to locate all versions of python and python3 in the PATH var, and launch the one with the highest version number. If no python or python3 version is found - it will offer to install python for you (the same way my .bat starters have in Windows for awhile).

If you have a specific version of python you want to use to start it, you can do something like:

'/path/to/your/specific/version/of/python' '/path/to/ProperTree.py'

(Note the .py extension in the path to ProperTree)

You can also still leverage the buildapp-select.command located in the Scripts folder to build a .app bundle with the shebang targeting a specific version of python.

Hopefully that helps,

-CorpNewt

rogeriomq commented 2 years ago

My result when running the script was(MacOS Monterey):


/usr/local/bin/python3 ProperTree.py
Traceback (most recent call last):
File "/Users/destroyer/Downloads/hackintosh/ProperTree-master/ProperTree.py", line 5, in <module>
import Tkinter as tk
ModuleNotFoundError: No module named 'Tkinter'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/destroyer/Downloads/hackintosh/ProperTree-master/ProperTree.py", line 12, in import tkinter as tk File "/usr/local/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/init.py", line 37, in import _tkinter # If this fails your Python may not be configured for Tk ModuleNotFoundError: No module named '_tkinter'


⚠️
I solved the problem by installing python-tk, in my case: `brew install python-tk@3.9`. My python3 in version 3.9.x
eudocimus commented 3 weeks ago

Installed Python 3.13.0 using MacPorts and tkinter, then Xquartz to be able to run it. But now my problem is that Xquartz controls the menu bar and there are no ProperTree menus anywhere. Keyboard shortcuts don't work either. Neither Command+o, Option+o nor Ctrl+o has any effect.