File size: 1,603 Bytes
3d2dbcf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
.. _install:

Installation Guide
==================

Docker
------

The easiest way to use CityFlow is via docker.

.. code-block:: shell
    
    docker pull cityflowproject/cityflow:latest

This will create docker image ``cityflow:latest``.

.. code-block:: shell
    
    docker run -it cityflowproject/cityflow:latest

Create and start a container, CityFlow is out-of-the-box along with miniconda with python3.6.

.. code-block:: python
    
    import cityflow
    eng = cityflow.Engine

Build From Source
-----------------

If you want to get nightly version of CityFlow or running on native system, you can build CityFlow from source. Currently, we only support building on Unix systems. This guide is based on Ubuntu 16.04.

CityFlow has little dependencies, so building from source is not scary.

1. Check that you have python 3 installed. Other version of python might work, however, we only tested on python with version >= 3.5.


2. Install cpp dependencies

.. code-block:: shell
    
    sudo apt update && sudo apt install -y build-essential cmake

3. Clone CityFlow project from github.

.. code-block:: shell
    
    git clone https://github.com/cityflow-project/CityFlow.git
    
4. Go to CityFlow project's root directory and run

.. code-block:: shell
    
    pip install .

5. Wait for installation to complete and CityFlow should be successfully installed.

.. code-block:: python
    
    import cityflow
    eng = cityflow.Engine

For Windows Users
------------------

For Windows users, it is recommended to run CityFlow under Windows Subsystem for Linux (WSL) or use docker.