Running a Python ABM

Running a Python ABM

These instructions are for Mac OS X. A similar process probably applies for Windows; you may have luck with Spyder.

  1. 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.
  2. Download and install TextMate
  3. Go to the “Variables” tab in Textmate’s preferences
  4. Add a new variable. Name it TM_PYTHON and set the value to /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 textmate-vars
  5. Open the .py file in Textmate and press Command-R – Python should launch, and the model should run.
  6. 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
model

About »

Hi, I'm C. Harwick, an economics PhD candidate in Virginia with an interest in monetary theory, institutional evolution, and folk music.

Care to know more? Read on »

Twitter »

    • Apr2622:15
      Bill Nye is no eugenicist. No, it’s worse than that: he’s a dysgenicist.
    • Apr2622:07
      RT @Faris_dream: I’m going to translate some tweets in this hashtag #مرتد_حفرالباطن the world must see this.


Design By Cameron Harwick Powered By Wordpress Hosted By Nearlyfreespeech No Copyrights