Setting up OctoPrint on MacOS


  • Must be performed with a user with Administrative privileges.

  • Requires the latest version of Xcode suitable for your OS X. For example, OS X 10.11 (El Capitan) requires Xcode 7. Specifically, this is to ensure that locally compiled components of Python libraries (such as pyobjc) can be installed successfully.

Install Xcode's Command Line Tools

  • xcode-select --install – this may ask you to accept the Xcode user license.

  • It doesn't hurt to also run sudo xcodebuild, to be sure the license acceptance process completed. If successful, you should see something like this: The directory /Users/myusername does not contain an Xcode project.

  • If you have more than one version of Xcode installed (unlikely -- you will know if you do) then ...

    sudo xcode-select -s /Applications/

Install Homebrew and use it to install Python

A version of Python 3 is already installed within OS X; however, OcoPrint requires Python 2.7, which can be installed with Homebrew as follows:

  • ruby -e "$(curl -fsSL"
  • brew install python@2

Install virtualenv

Note: for users with Anaconda or multiple python versions installed, make sure to use Python 2.7 from Homebrew. Homebrew uses this default directory: /usr/local/opt/python/libexec/bin. If needed, replace two of the below commands with /usr/local/opt/python/libexec/bin/python -m pip install virtualenv and /usr/local/opt/python/libexec/bin/python -m virtualenv venv.

We utilize virtualenv to maintain an isolated Python environment for OctoPrint development. This prevents other, global Python libraries or updates from breaking OctoPrint. While not strictly required, virtualenv can save us from headaches, down the road. See the virtualdev docs for more detail.

  • pip install virtualenv

Installing OctoPrint

  • git clone
  • cd OctoPrint
  • virtualenv venv
  • source venv/bin/activate (assumes you're using the default BASH shell. active.csh is also available.)
  • pip install -U pyobjc
  • python install

Running OctoPrint

  • cd OctoPrint – the folder created from the above git clone
  • source venv/bin/activate
  • octoprint serve


  • path/to/OctoPrint/venv/bin/octoprint

Accessing the web interface

Assuming that you haven't also installed haproxy you can get to the OctoPrint web interface from its default port of 5000 locally on your Mac via http://localhost:5000/.

Auto start on boot

Credit to Fahim Hossain on medium

Using a plist like this you can start octoprint when turning on the mac, even without logging in.

  • sudo nano /Library/LaunchDaemons/it.YOURNAME.octoprint.plist – edit this file
  • replace "USER" with your username (the short one on the left in the terminal)
  • assuming you have install OctoPrint in ~/OctoPrint
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">

This is a wiki post that anyone with trust level 2 or higher can contribute to. Please do so.

Originally part of the OctoPrint wiki on Github, migrated on 2019-11-13.


I'm getting
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128)

Traceback (most recent call last):
File "", line 233, in
File "", line 159, in params
version = versioneer.get_version()
File "/Users/Nathan/OctoPrint/", line 1909, in get_version
return get_versions()["version"]
File "/Users/Nathan/OctoPrint/", line 1871, in get_versions
pieces = versions_from_lookup_f(lookup_data, root, verbose)
File "/Users/Nathan/OctoPrint/", line 1435, in git_pieces_from_lookup
File "/Users/Nathan/OctoPrint/", line 484, in run_command
else None))
File "/usr/local/Cellar/python@2/2.7.17_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 394, in init
errread, errwrite)
File "/usr/local/Cellar/python@2/2.7.17_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 1047, in _execute_child
raise child_exception
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128)