Skip to content

Installation

Paul Waddell edited this page Feb 27, 2019 · 4 revisions

[Below is work in progress]

First, install Anaconda python and make sure you have Git installed if you don't already

Enter the following sequence of conda commands from terminal:

  • conda config --add channels udst
  • conda config --add channels conda-forge
  • conda create --name urbansim python=3.6
  • linux and osx: source activate urbansim; windows: activate urbansim
  • conda install urbansim
  • conda install pandana
  • conda install altair==1.2.0
  • if installing on Windows: conda install hdf5

In order to run the jupyter notebooks enter the following sequence of conda commands:

  • conda install seaborn
  • conda install bokeh
  • conda install datashader
  • conda install nb_conda
  • conda install geopandas
  • conda install shapely
  • conda install matplotlib

Note the urbansim conda environment above- this will be an isolated conda environment with the dependencies for your model. In all the instructions below, ensure that the urbansim environment is activated (linux and osx: source activate urbansim; windows: activate urbansim).

it is suggested you clone the repos below into a projects folder or a location where you usually store repos from GitHub.

Clone/install choicemodels

  • git clone https://github.com/udst/choicemodels
  • cd choicemodels
  • python setup.py develop
  • cd ..

Clone/install urbansim_templates (note the ej-test branch)

  • git clone https://github.com/udst/urbansim_templates -b ej-test
  • cd urbansim_templates
  • python setup.py develop
  • cd ..

Clone/install variable_generators

  • git clone https://github.com/udst/variable_generators
  • cd variable_generators
  • python setup.py develop
  • cd ..

Clone/install developer

  • git clone https://github.com/udst/developer
  • cd developer
  • python setup.py develop
  • cd ..

Clone/install urbansim_parcels template (note the ej-test branch)

  • git clone https://github.com/urbansim/urbansim_parcels -b ej-test
  • cd urbansim_parcels
  • python setup.py develop
  • cd ..

Clone/install the bayarea library

  • git clone https://github.com/ual/bayarea
  • cd bayarea
  • python setup.py develop

Download the latest model_data.h5, and place in the bayarea/bayarea/data directory. (See the latest model_data.h5 file in the shared /data/base directory on Drive)

From the bayarea/bayarea directory, start a jupyter notebook session in a terminal by running jupyter notebook

In the notebook, check that the urbansim env kernel is used

  • Kernel -> Change kernel -> urbansim

If the kernel cannot be found in the kernel list, you can add it manually by first activating your urbansim env then typing in terminal: python -m ipykernel install --name urbansim

Test the installation

  1. From a terminal in the 'bayarea/bayarea' directory, first activate your urbansim env then run python simulate.py -y 2020
  2. Run all the notebooks and see if any error messages pop up