Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Simplified install process on Mac #1705
I was trying to install OctoPrint on macOS by following the steps in the README when I ran into the problem "No module named AppKit", the same as here: #1565. It turns out OctoPrint was using NSSearchPathForDirectoriesInDomains from AppKit to get the Application Support directory. This required an extra step of installing pyobjc.
However, pyobjc isn't that easy to install now because of System Integrity Protection (http://apple.stackexchange.com/questions/209572/how-to-use-pip-after-the-os-x-el-capitan-upgrade). Hopefully Mac users could get OctoPrint set up without this extra step at all. So I decided to simplify and use appdirs (https://pypi.python.org/pypi/appdirs) instead. This can be installed easily in setup.py and does exactly what we need by finding the same Application Support directory.
After this change I was able to install and run OctoPrint on my Mac.
Hm.. Can we wrap this additional dependency into a platform specific check so it only gets installed on Macs? Most common OS for running OctoPrint on is Linux, so I'd rather avoid always pulling in a Mac-specific dependency.
Something like a simple
Great! I've cherry picked this on
Since Github won't pick up on this cherry-pick-based merge, you'll get a "closed" message instead of a "merged" message, please don't be alarmed by this.
I also took the liberty and added your name to the list of authors.