[Solution] Simple macOS Monterey ProperTree fix
Overc1ocker opened this issue · comments
Please note: The solution found in Readme.md also works.
-
Install Python 3 for macOS Python 3.10 Mac
-
Launch terminal
-
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
I'm getting File "/Users/stooovie/Downloads/ProperTree/ProperTree.command", line 9 NL=$'\n' ^ SyntaxError: invalid syntax
The path is correct
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
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 <module>
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 <module>
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