Problems while setting up the project on macOS Mavericks (10.14)


Hi - I am new to openAg and am trying to setup the project software on my mac (it is the latest, current OS).

However, the install script doesn’t run out of the box; I try running the install scripts individually but there is a recurring problem with python3.6 & pip3.6 packages. iptables is not a supported package as far as I can figure out.

My question is this: Has anyone tried to work with a similar setup and run into issues? If anyone has set this up on a mac; please do reach out!



The OSX support is still a work in progress, sorry for the issues you found. I made a few changes and it now builds / runs on my mac running 10.14.3.


Thanks for the revert @rbaynes. This’ll make my life simpler. I was getting into running an ubuntu/centos image on top of osx to get around this. Desperation?

Anyways, am about to start a new build diary, hopefully my first emulation of openag brain gets me up&running.
Thanks again!


Great! Nice to have someone working on the bleeding edge with me. I am working on the drivers I need for a FT232H cable this week. The chip translates USB to I2C so we can talk to the hardware we build. I’m hoping there is a good python driver for it and I won’t have to resort to using FTDI’s C library.


Sounds interesting, are you logging this somewhere? Plan on checking in later today/over the weekend.

I updated my build to pull the changes, however the is breaking (have attached the stack). Lmk if you get some time to go over it (might get tedious from the naive approaches I will use).stack.pdf (85.0 KB)


My first guess would be that you are running python 3.7. I have only tested on Python 3.6.8.


Yes, that’s correct. I am building this on py37. I have made the changes to get this up (namely hardcoded py & pip versions) - this line is giving me errors:
Creating postgres user…

ERROR: role “openag” already exists


Creating database…

ERROR: database “openag_brain” already exists


Fixed that, plus the python3.6 hardcoded mention in order to invoke Currently working through the below stack:

24/Feb/2019 11:58:04.200] DEBUG app: Getting api root view
System check identified no issues (0 silenced).
Exception in thread Thread-1:
Traceback (most recent call last):
File “/Users/utkarshgupta/bountytech/openag-device-software/venv/lib/python3.7/site-packages/django/db/backends/”, line 64, in execute
return self.cursor.execute(sql, params)
psycopg2.ProgrammingError: relation “app_sensorvariablemodel” does not exist
LINE 1: DELETE FROM “app_sensorvariablemodel”

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/”, line 917, in _bootstrap_inner
File “/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/”, line 865, in run
self._target(*self._args, **self._kwargs)
File “/Users/utkarshgupta/bountytech/openag-device-software/device/coordinator/”, line 204, in run
File “/Users/utkarshgupta/bountytech/openag-device-software/device/coordinator/”, line 231, in run_init_mode
File “/Users/utkarshgupta/bountytech/openag-device-software/device/coordinator/”, line 446, in load_local_data_files
File “/Users/utkarshgupta/bountytech/openag-device-software/device/coordinator/”, line 480, in load_sensor_variables_file
File “/Users/utkarshgupta/bountytech/openag-device-software/venv/lib/python3.7/site-packages/django/db/models/”, line 620, in delete
deleted, _rows_count = collector.delete()
File “/Users/utkarshgupta/bountytech/openag-device-software/venv/lib/python3.7/site-packages/django/db/models/”, line 284, in delete
count = qs._raw_delete(using=self.using)
File “/Users/utkarshgupta/bountytech/openag-device-software/venv/lib/python3.7/site-packages/django/db/models/”, line 634, in _raw_delete
return sql.DeleteQuery(self.model).delete_qs(self, using)
File “/Users/utkarshgupta/bountytech/openag-device-software/venv/lib/python3.7/site-packages/django/db/models/sql/”, line 80, in delete_qs
cursor = self.get_compiler(using).execute_sql(CURSOR)
File “/Users/utkarshgupta/bountytech/openag-device-software/venv/lib/python3.7/site-packages/django/db/models/sql/”, line 899, in execute_sql
raise original_exception
File “/Users/utkarshgupta/bountytech/openag-device-software/venv/lib/python3.7/site-packages/django/db/models/sql/”, line 889, in execute_sql
cursor.execute(sql, params)
File “/Users/utkarshgupta/bountytech/openag-device-software/venv/lib/python3.7/site-packages/django/db/backends/”, line 79, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File “/Users/utkarshgupta/bountytech/openag-device-software/venv/lib/python3.7/site-packages/django/db/backends/”, line 64, in execute
return self.cursor.execute(sql, params)
File “/Users/utkarshgupta/bountytech/openag-device-software/venv/lib/python3.7/site-packages/django/db/”, line 94, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File “/Users/utkarshgupta/bountytech/openag-device-software/venv/lib/python3.7/site-packages/django/utils/”, line 685, in reraise
raise value.with_traceback(tb)
File “/Users/utkarshgupta/bountytech/openag-device-software/venv/lib/python3.7/site-packages/django/db/backends/”, line 64, in execute
return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: relation “app_sensorvariablemodel” does not exist
LINE 1: DELETE FROM “app_sensorvariablemodel”


I got this running, had to run migrate once.
Currently, the password for the brain is not working. Any clues on this?

Screenshot 2019-02-26 at 3.50.20 PM


That is usually an issue with setting up the database. If you look at scripts/database there is one that populates postgresql with the default user and password. You can also use psql to look at the DB directly.

OSX support (as you have seen) is still a work in progress. Besides myself, you are only the second person to try to get it working. Sorry for the hassles.


Hmm I know! I’m trying the defaults in the psql script (openag/openag) - maybe I need to get another db up, don’t want to explore stuff without getting it properly though.

Happy to help in any way reg. OSX dev by the way. I myself switched from a Dell with debian/windows to mac little over a year ago. So good for me to finally starting dev here.


There is a database drop/delete script. Perhaps do that first, then look at the script and re-do the parts (in the same order) that create the DB, migrate it and add the users.