These instructions are for Mac OS X. A similar process probably applies for Windows; you may have luck with Spyder.
- The agent-based models (ABMs) here are written in Python 3. Your system likely has Python 2 pre-installed. Download and install the latest version of Python 3.
- Download and install TextMate
- Go to the “Variables” tab in Textmate’s preferences
- Add a new variable. Name it
TM_PYTHON and set the value to
- Open the .py file in Textmate and press Command-R – Python should launch, and the model should run.
- If you get an error to the effect of
ImportError: "No module named 'something'":
- Install PIP
- Open the terminal and type
pip install something where ‘something’ is the name of the missing module. (If this doesn’t work, try
python3 -m pip install something)
- Repeat the previous step until the model runs