BKRCast Setup (pip virtual environment with Python 3) - bellevuewa/BKRCast GitHub Wiki
This section contains two subsections that describe the BKRCast model setup process:
System Setup
Follow the steps below if python 3.7 is used.
Step 1. Python 3.7 installation
Download python 3.7.6 from here. Choose 64-bit version (Windows x86-64 executable installer
). When installing the software, choose default settings. Do not choose to install for all users.
Open Windows command prompt
. Run the commands by following the steps below.
Step 2. Upgrade pip
python -m pip install --upgrade pip
Step 3. Install virtualenv package
python -m pip install virtualenv
Step 4. Create a virtual environment named BKRCastVE
Change current directory to your preferred one where you want to have BKRCastVE installed by using cd
command. For example, cd d:\
. Then run the command line:
python -m virtualenv BKRCastVE
Step 5. Activate the virtual environment BKRCastVE
BKRCastVE\Scripts\activate
If you want to exit the BKRCastVE virtual environment, run the command line:
deactivate
Step 6. Install packages for BKRCastVE
Download the requirement file. Save it to the current directory.
pip install -r bkrcast_python3_environment.txt
Emme
- So far, EMME 4.5.1 works with this setting. EMME 4.6.0 has some possible compatibility issues waiting for resolution.
- Open Emme Desktop
- Go to Tools → Application Options → Modeller
- Copy the file [Emme Path]\emme.pth to the created virtual environment
BKRCastVE\Lib\site-packages
- Change Python Path to the BKRCast environment folder that was created in the steps above. For example,
D:\BKRCastVE\Scripts
. - Select
Install Package
orUpdate Modeller Package
and click OK. - Close Emme
GitHub Installation
- Download and install GitHub Desktop from here
- Download and install Git LFS from here
- Start Git LFS by entering
git lfs install
in a command line window
Git Installation
Download Git from https://git-scm.com/download/win. Choose latest 64-bit Windows version. Follow the installation instructions to complete installation.
Git Credential Manager
It is recommended to download and install git credential manager for Windows.
TortoiseGit Installation
Download TortoiseGit from https://tortoisegit.org/download/. Choose latest 64-bit version. Follow the installation instruction to complete installation.
Model Setup
The following steps are recommended to set up the BKRCast model on a machine:
- Download setup:
- Open command prompt window (console mode). Change current directory to the working directory.
- Run command
git clone https://github.com/bellevuewa/BKRCast
. This command is to clone the BKRCast repository. This is a public repository and primarily contains scripts/programs and configuration files.
Daysim is installed in daysim_2019 subfolder. The current Daysim version BKRCast is using is 2.2.0-beta.427. - Get the BKRCast input files. Save input files under BKRCast/inputs. We no longer keep BKRCastInputs on GitHub.
- Update input_configuration.py:
- Under BKRCast root folder, open input_configuration.py in a text editor.
- Set
project_folder
to the BKRCast folder on the target machine - Set
parcels_file_folder
to the directory of the primary parcel file
The following tree diagram represents a BKRCast model directory that is ready for a model run based on the aforementioned setup guidance.