Skip to content

Instantly share code, notes, and snippets.

@smmaurer
Last active January 10, 2019 21:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smmaurer/f3a4f424a4aa877fb73e1cb2567bd89d to your computer and use it in GitHub Desktop.
Save smmaurer/f3a4f424a4aa877fb73e1cb2567bd89d to your computer and use it in GitHub Desktop.
Create a Conda environment for an UrbanSim Templates project
# It can be helpful to set up a dedicated Python environment for each project you work on. This lets you use a stable and
# replicable set of libraries that won't be affected by other projects.
# OPTION 1: Production releases of UrbanSim Templates and ChoiceModels
# - includes all requirements plus some other useful packages
conda create --name template-env --channel udst --channel conda-forge python=3.6 scipy numpy pandas statsmodels patsy \
urbansim orca choicemodels urbansim_templates pylogit scikit-learn jupyter nb_conda_kernels matplotlib geopandas pandana
# USAGE: Activate the environment every time you want to use it, and separately for each Terminal window
source activate template-env
# OPTION 2: Developer releases of UrbanSim Templates and ChoiceModels
# - also includes additional packages useful for development and testing
conda create --name template-env --channel udst --channel conda-forge python=3.6 scipy numpy pandas statsmodels patsy \
urbansim orca pylogit scikit-learn jupyter nb_conda_kernels matplotlib geopandas pandana \
pytest coverage coveralls sphinx numpydoc sphinx_rtd_theme
# Activate the environment and install choicemodels and urbansim_templates into it
source activate template-env
git clone https://github.com/udst/choicemodels.git
git clone https://github.com/udst/urbansim_templates.git
cd choicemodels
python setup.py develop
cd ../urbansim_templates
python setup.py develop
# REMOVE AN ENVIRONMENT
conda remove --name template-env --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment