I installed oemer using the instructions from this page: https://github.com/BreezeWhite/oemer .
pip3 install oemer
(I had to use pip3 on my system.)
Then went to run it, also according to instructions on that page:
oemer ~/Pictures/trumpet.jpg
bash: oemer: command not found
So I get "command not found".
I thought maybe I needed to add the path to my $PATH, so to find the location of oemer, I ran
pip3 show oemer
Name: oemer
Version: 0.1.5
Summary: End-to-end Optical Music Recognition (OMR) system.
Home-page: https://github.com/BreezeWhite/oemer
Author: BreezeWhite
Author-email: miyasihta2010@tuta.io
License: License :: OSI Approved :: MIT License
Location: /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages
Requires: matplotlib, onnxruntime, opencv-python, pillow, scikit-learn, scipy
Required-by:
and added /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages to my $PATH. Still didn't work. So I explicitly ran:
/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/oemer ~/Pictures/trumpet.jpg
bash: /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/oemer: is a directory
Ahh, oemer is a directory, not an executable.
So my question is, how do I run oemer, or any other package installed by pip for that matter?
I tried:
pip3 /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/oemer
ERROR: unknown command "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/oemer"
...and...
python3 /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/oemer
/usr/local/bin/python3: can't find '__main__' module in '/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/oemer'
Searches such as "how to run python packages on macos" come up empty, with most results showing how to install python packages, how to install python, or how to install pip.
The binary for oemer is located here:
/Library/Frameworks/Python.framework/Versions/3.12/bin/
As well as other python scripts installed using pip.
One could add that to their $PATH in their shell config file, though I would recommend creating a symlink in a path that is already in your $PATH:
sudo ln -s /Library/Frameworks/Python.framework/Versions/3.12/bin/oemer /usr/local/bin/oemer