weeWX: Installation on macOS systems

This is a guide to installing weeWX on macOS.

Download

Download the source archive weewx-X.Y.Z.tar.gz from weewx.com/downloads.

Install prerequisites

Ensure that Python2 is installed. Python 2.6 or 2.7 will work, but Python 3 will not.

python -V

Install the required Python packages using easy_install:

sudo easy_install pysqlite
sudo easy_install configobj
sudo easy_install Cheetah
sudo easy_install PIL
sudo easy_install pyserial
sudo easy_install pyusb
sudo easy_install pyephem

Depending on the macOS and Python versions, you might have to use Pillow instead of PIL.

If the PIL or Cheetah installation fails, you might have to install xcode:

xcode-select --install

then try the easy_install again.

Install weeWX

Expand the source archive:

tar xvfz weewx-X.Y.Z.tar.gz

Change directory:

cd weewx-X.Y.Z

Modify home in setup.cfg to set the installation location to /Users/Shared/weewx

perl -pi -e 's%^home.*%home = /Users/Shared/weewx%' setup.cfg

Install:

python setup.py install

The installer will prompt for a location, latitude/longitude, altitude, station type, and parameters specific to the station.

Run

Run the main program directly:

cd /Users/Shared/weewx
./bin/weewxd weewx.conf

Or as a daemon automatically when the computer starts:

sudo cp util/launchd/com.weewx.weewxd.plist /Library/LaunchDaemons
sudo launchctl load /Library/LaunchDaemons/com.weewx.weewxd.plist

Status

To make sure things are running properly, look in the system log for messages from weeWX. Run the Console application and select All Messages.

Verify

After about 5 minutes, open the station web page in a web browser. You should see your station information and data.

file:///Users/Shared/weewx/public_html/index.html

If your hardware supports hardware archiving, then how long you wait will depend on the archive interval set in your hardware.

Customize

To enable uploads such as Weather Underground or to customize reports, modify the configuration file /Users/Shared/weewx/weewx.conf. See the User Guide and Customization Guide for details.

WeeWX must be restarted for configuration file changes to take effect.

Start/Stop

To start/stop weeWX:

sudo launchctl load /Library/LaunchDaemons/com.weewx.weewxd.plist
sudo launchctl unload /Library/LaunchDaemons/com.weewx.weewxd.plist

Uninstall

To uninstall, simply delete the directory /Users/Shared/weewx. This will delete weeWX, configuration files, and data.

rm -r /Users/Shared/weewx
sudo rm /Library/LaunchDaemons/com.weewx.weewxd.plist

Layout

The instructions above will result in the following layout:

executable: /Users/Shared/weewx/bin/weewxd
configuration file: /Users/Shared/weewx/weewx.conf
skins and templates: /Users/Shared/weewx/skins/
sqlite databases: /Users/Shared/weewx/archive/
generated web pages and images: /Users/Shared/weewx/public_html/
documentation: /Users/Shared/weewx/docs/
examples: /Users/Shared/weewx/examples/
utilities: /Users/Shared/weewx/bin/wee_*