The Higher Education and Research forge

Home My Page Projects Code Snippets Project Openings EMULSION public releases
Summary Activity Surveys SCM Listes Sympa

SCM Repository

2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5 <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
6   <head>
7     <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
8     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9     <title>Installation &#8212; EMULSION (Epidemiological Multi-Level Simulation framework)</title>
10     <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
11     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
12     <link rel="stylesheet" href="../_static/css/custom.css" type="text/css" />
13     <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
14     <script type="text/javascript" src="../_static/jquery.js"></script>
15     <script type="text/javascript" src="../_static/underscore.js"></script>
16     <script type="text/javascript" src="../_static/doctools.js"></script>
17     <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
18     <link rel="shortcut icon" href="../_static/STEMAH-favicon.png"/>
19     <link rel="index" title="Index" href="../genindex.html" />
20     <link rel="search" title="Search" href="../search.html" />
21     <link rel="next" title="Getting started with EMULSION" href="Getting_started.html" />
22     <link rel="prev" title="EMULSION Manual" href="../index.html" />
23    
24   <link rel="stylesheet" href="../_static/custom.css" type="text/css" />
25   
26   
27   <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
29   </head><body>
30   
32     <div class="document">
33       <div class="documentwrapper">
34         <div class="bodywrapper">
35           <div class="body" role="main">
36             
37   <div class="section" id="installation">
38 <h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h1>
39 <div class="section" id="requirements">
40 <h2>Requirements<a class="headerlink" href="#requirements" title="Permalink to this headline">¶</a></h2>
41 <dl class="docutils">
42 <dt>System</dt>
43 <dd><p class="first">EMULSION has been designed under <strong>MacOS</strong> and <strong>Linux</strong>, and
44 works (with minor limitations) with <strong>Windows 10</strong>. See the
45 installation procedure specific to your system.</p>
46 <p class="last">Also, in what follows, we assume that MacOS and Linux users are
47 working with a <strong>bash</strong> shell. If you are not sure, typing: <code class="docutils literal notranslate"><span class="pre">echo</span>
48 <span class="pre">$SHELL</span></code> in a terminal should print <code class="docutils literal notranslate"><span class="pre">/bin/bash</span></code>. Otherwise, please refer to
49 the documentation of your shell to adapt the commands below.</p>
50 </dd>
51 <dt>Language</dt>
52 <dd><p class="first">EMULSION is written in <strong>Python 3</strong> (version 3.6 or higher). In what
53 follows, we assume that <code class="docutils literal notranslate"><span class="pre">python3</span></code> and <code class="docutils literal notranslate"><span class="pre">pip3</span></code> refer to your
54 Python3 installation. If not, replace them by your own
55 configuration in the commands below (e.g. with Windows:
56 respectively <code class="docutils literal notranslate"><span class="pre">python.exe</span></code> and <code class="docutils literal notranslate"><span class="pre">pip.exe</span></code>).</p>
57 <p class="last">To install Python on your system, please consult
58 <a class="reference external" href="https://www.python.org/downloads/">Python website</a>. When
59 installing on Windows, check the box “Add Python 3.x to PATH” to
60 make python commands available from the terminal.</p>
61 </dd>
62 </dl>
63 </div>
64 <div class="section" id="install-with-pip-recommended">
65 <h2>Install with <code class="docutils literal notranslate"><span class="pre">pip</span></code> (recommended)<a class="headerlink" href="#install-with-pip-recommended" title="Permalink to this headline">¶</a></h2>
66 <div class="section" id="linux-and-macos">
67 <h3>Linux and MacOS:<a class="headerlink" href="#linux-and-macos" title="Permalink to this headline">¶</a></h3>
68 <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo pip3 install emulsion
69 init_emulsion
70 <span class="nb">source</span> <span class="nv">$HOME</span>/.bashrc
71 </pre></div>
72 </div>
73 <p>Depending on how you installed Python, <code class="docutils literal notranslate"><span class="pre">sudo</span></code> is sometimes
74 optional.</p>
75 <p>The second command (<code class="docutils literal notranslate"><span class="pre">init_emulsion</span></code>) initializes command-line
76 completion (available with a bash shell, under Linux or MacOS), which allows
77 to use <code class="docutils literal notranslate"><span class="pre">TAB</span></code> key to get suggestions on what is expected (options,
78 files, parameters…) in the command. It also creates (or modifies)
79 the environment variable named <code class="docutils literal notranslate"><span class="pre">PYTHONPATH</span></code> to make EMULSION able to
80 find code add-ons located in the same directory as your models.</p>
81 <p>EMULSION <a class="reference external" href="https://sourcesup.renater.fr/emulsion-public">documentation</a>
82 is provided on-line.</p>
83 </div>
84 <div class="section" id="windows">
85 <h3>Windows<a class="headerlink" href="#windows" title="Permalink to this headline">¶</a></h3>
86 <p>Open a terminal (“Command Prompt” or “Windows Power Shell”), then
87 type:</p>
88 <div class="highlight-batch notranslate"><div class="highlight"><pre><span></span>pip.exe install emulsion
89 </pre></div>
90 </div>
91 <p>To make EMULSION able to find code add-ons in the directory where your model
92 files are located, you must declare (or modify) an environment
93 variable named <code class="docutils literal notranslate"><span class="pre">PYTHONPATH</span></code> to add the current directory (“<code class="docutils literal notranslate"><span class="pre">.</span></code>”).</p>
94 <p>To do so, you can use the graphical interface (from System
95 Preferences), or the terminal. The syntax depends on the kind of
96 terminal you are using:</p>
97 <blockquote>
98 <div><ul>
99 <li><p class="first">with the “Command Prompt” (<code class="docutils literal notranslate"><span class="pre">cmd.exe</span></code>), type:</p>
100 <div class="highlight-batch notranslate"><div class="highlight"><pre><span></span>setx PYTHONPATH <span class="s2">&quot;.;</span><span class="nv">%PYTHONPATH%</span><span class="s2">&quot;</span>
101 </pre></div>
102 </div>
103 </li>
104 <li><p class="first">with “Windows Power Shell”, type:</p>
105 <div class="highlight-batch notranslate"><div class="highlight"><pre><span></span>setx PYTHONPATH <span class="s2">&quot;.;$Env:PYTHONPATH&quot;</span>
106 </pre></div>
107 </div>
108 </li>
109 </ul>
110 </div></blockquote>
111 </div>
112 </div>
113 <div class="section" id="install-third-party-software">
114 <h2>Install third-party software<a class="headerlink" href="#install-third-party-software" title="Permalink to this headline">¶</a></h2>
115 <p><a class="reference external" href="http://www.graphviz.org">Graphviz</a> is highly recommended
116 (otherwise, simulations will run but you will not be able to get the
117 nice diagrams representing model structure).</p>
118 <div class="section" id="linux">
119 <h3>Linux<a class="headerlink" href="#linux" title="Permalink to this headline">¶</a></h3>
120 <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo apt install graphviz
121 </pre></div>
122 </div>
123 </div>
124 <div class="section" id="macos">
125 <h3>MacOS<a class="headerlink" href="#macos" title="Permalink to this headline">¶</a></h3>
126 <p>To install on MacOS, use for instance <a class="reference external" href="https://brew.sh/">homebrew</a></p>
127 <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>brew install graphviz
128 </pre></div>
129 </div>
130 </div>
131 <div class="section" id="id1">
132 <h3>Windows<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3>
133 <p>To install on Windows, download the latest stable version from
134 <a class="reference external" href="https://graphviz.gitlab.io/_pages/Download/Download_windows.html">Graphviz website</a>
135 and update the <code class="docutils literal notranslate"><span class="pre">PATH</span></code> environment variable according to where you
136 installed the executable files (especially <code class="docutils literal notranslate"><span class="pre">dot.exe</span></code>).
137 For instance, if <code class="docutils literal notranslate"><span class="pre">dot.exe</span></code> is located in
138 <code class="docutils literal notranslate"><span class="pre">C:\Program</span> <span class="pre">Files</span> <span class="pre">(x86)\Graphviz\bin</span></code>, just type:</p>
139 <blockquote>
140 <div><ul>
141 <li><p class="first">in the “Command Prompt”:</p>
142 <div class="highlight-batch notranslate"><div class="highlight"><pre><span></span>setx PATH <span class="s2">&quot;C:\Program Files (x86)\Graphviz\bin;</span><span class="nv">%PATH%</span><span class="s2">&quot;</span>
143 </pre></div>
144 </div>
145 </li>
146 <li><p class="first">in “Windows Power Shell”:</p>
147 <div class="highlight-batch notranslate"><div class="highlight"><pre><span></span>setx PATH <span class="s2">&quot;C:\Program Files (x86)\Graphviz\bin;$Env:PATH&quot;</span>
148 </pre></div>
149 </div>
150 </li>
151 </ul>
152 </div></blockquote>
153 </div>
154 </div>
155 <div class="section" id="test-your-installation">
156 <h2>Test your installation<a class="headerlink" href="#test-your-installation" title="Permalink to this headline">¶</a></h2>
157 <p>Download <strong>model examples</strong>
158 <a class="reference external" href="https://sourcesup.renater.fr/emulsion-public/models.zip">here.</a></p>
159 <p>Extract the archive, open a terminal in the <code class="docutils literal notranslate"><span class="pre">models</span></code> directory, then type:</p>
160 <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span> quickstart
161 emulsion run --plot quickstart.yaml --view-model --silent
162 </pre></div>
163 </div>
164 <p>This should produce the following output:</p>
165 <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Simulation</span> <span class="n">level</span><span class="p">:</span><span class="n">herd</span>
166 <span class="n">Generated</span> <span class="n">state</span> <span class="n">machine</span> <span class="n">diagram</span> <span class="n">img</span><span class="o">/</span><span class="n">Quickstart_age_group_machine</span><span class="o">.</span><span class="n">svg</span>
167 <span class="n">Generated</span> <span class="n">state</span> <span class="n">machine</span> <span class="n">diagram</span> <span class="n">img</span><span class="o">/</span><span class="n">Quickstart_life_cycle_machine</span><span class="o">.</span><span class="n">svg</span>
168 <span class="n">Generated</span> <span class="n">state</span> <span class="n">machine</span> <span class="n">diagram</span> <span class="n">img</span><span class="o">/</span><span class="n">Quickstart_health_state_machine</span><span class="o">.</span><span class="n">svg</span>
169 <span class="mi">100</span><span class="o">%|*************************************************************|</span> <span class="mi">10</span><span class="o">/</span><span class="mi">10</span>
170 <span class="n">Simulation</span> <span class="n">finished</span> <span class="ow">in</span> <span class="mf">12.37</span> <span class="n">s</span>
171 <span class="n">Outputs</span> <span class="n">stored</span> <span class="ow">in</span> <span class="n">outputs</span><span class="o">/</span><span class="n">counts</span><span class="o">.</span><span class="n">csv</span>
172 <span class="n">Outputs</span> <span class="n">plot</span> <span class="ow">in</span> <span class="n">file</span><span class="p">:</span> <span class="n">img</span><span class="o">/</span><span class="n">Quickstart</span><span class="o">.</span><span class="n">html</span>
173 </pre></div>
174 </div>
175 <p>and the following figures should appear in your navigator:</p>
176 <div align="center" class="align-center"><object data="../_images/graphviz-92fc12dfc05ef7d71faa8575198ddd05ca7de496.svg" type="image/svg+xml">
177             <p class="warning">digraph {
178                 rankdir=LR;
179                 node[fontsize=16, fontname=Arial, shape=box, style=&quot;filled,rounded&quot;];
180                 edge[minlen=1.5, penwidth=1.5, tailtooltip=&quot;&quot;, headtooltip=&quot;&quot;];
182                 &quot;J&quot; [shape=&quot;Mrecord&quot;, label=&quot;{{\ J\ |&amp;#9670;}}&quot;, tooltip=&quot;J (Juvenile):
183         juvenile animals&quot;, fillcolor=orange, style=&quot;filled,rounded,bold&quot;] ;
184         &quot;A&quot; [shape=&quot;Mrecord&quot;, label=&quot;{{\ A\ |&amp;#9670;}}&quot;, tooltip=&quot;A (Adult):
185         adult animals&quot;, fillcolor=brown, style=&quot;filled,rounded&quot;] ;
186         &quot;J&quot; -&gt; &quot;A&quot; [label=&quot;proba: 1&quot;, labeltooltip=&quot;proba: 1&quot;, arrowtail=&quot;nonetee&quot;, arrowhead=&quot;normalnone&quot;, dir=both, tooltip=&quot;COND: GreaterThan(age, adult_age)&quot;, minlen=3, style=&quot;solid&quot;];
187 }</p></object>
188 </div>
189 <img alt="../_images/Quickstart_JA.png" class="align-left" src="../_images/Quickstart_JA.png" />
190 <div align="center" class="align-center"><object data="../_images/graphviz-bc851614e8a7cff2efb11362b96ee26808197fa4.svg" type="image/svg+xml">
191             <p class="warning">digraph {
192                 rankdir=LR;
193                 node[fontsize=16, fontname=Arial, shape=box, style=&quot;filled,rounded&quot;];
194                 edge[minlen=1.5, penwidth=1.5, tailtooltip=&quot;&quot;, headtooltip=&quot;&quot;];
196                 &quot;G&quot; [shape=&quot;Mrecord&quot;, label=&quot;G&amp;nbsp;&amp;#9719;&quot;, tooltip=&quot;G (Gestating):
197         state for gestating animals&quot;, fillcolor=green, style=&quot;filled,rounded&quot;] ;
198         &quot;NG&quot; [shape=&quot;Mrecord&quot;, label=&quot;NG&amp;nbsp;&amp;#9719;&quot;, tooltip=&quot;NG (NonGestating):
199         state for empty animals&quot;, fillcolor=cyan, style=&quot;filled,rounded,bold&quot;] ;
200         &quot;G&quot; -&gt; &quot;NG&quot; [label=&quot;proba: 1&quot;, labeltooltip=&quot;proba: 1&quot;, arrowtail=&quot;none&quot;, arrowhead=&quot;normalnonediamond&quot;, dir=both, tooltip=&quot;&quot;, minlen=3, style=&quot;solid&quot;];
201         &quot;G&quot; -&gt; &quot;NG&quot; [label=&quot;proba: daily_abortion&quot;, labeltooltip=&quot;daily_abortion [parameter]:
202         daily probability that an infected animal aborts during gestation       
203         1 - (1 - global_abortion)**(1/gestation_duration)&quot;, arrowtail=&quot;noneoinv&quot;, arrowhead=&quot;normalnonediamond&quot;, dir=both, tooltip=&quot;ESCAPE: is_I&quot;, minlen=3, style=&quot;solid&quot;];
204         &quot;NG&quot; -&gt; &quot;G&quot; [label=&quot;rate: reproduction&quot;, labeltooltip=&quot;reproduction [parameter]:
205         reproduction rate of the animals                                        
206         0.05&quot;, arrowtail=&quot;nonetee&quot;, arrowhead=&quot;normalnone&quot;, dir=both, tooltip=&quot;COND: is_A&quot;, minlen=3, style=&quot;solid&quot;];
207 }</p></object>
208 </div>
209 <img alt="../_images/Quickstart_GNG.png" class="align-left" src="../_images/Quickstart_GNG.png" />
210 <div align="center" class="align-center"><object data="../_images/graphviz-0c38dc9bba694cc8d69e02343bdbff66fa19781f.svg" type="image/svg+xml">
211             <p class="warning">digraph {
212           charset=&quot;utf-8&quot;
213                 rankdir=LR;
214         
215                 node[fontsize=16, fontname=Arial, shape=box, style=&quot;filled,rounded&quot;];
216                 edge[minlen=1.5, fontname=Times, penwidth=1.5, tailtooltip=&quot;&quot;, headtooltip=&quot;&quot;];
218                 &quot;M&quot; [shape=&quot;Mrecord&quot;, label=&quot;M&amp;nbsp;&amp;#9719;&quot;, tooltip=&quot;M (Maternal protection):
219         animal protected by maternal antibodies&quot;, fillcolor=cyan, style=&quot;filled,rounded&quot;] ;
220         &quot;S&quot; [shape=&quot;Mrecord&quot;, label=&quot;S&quot;, tooltip=&quot;S (Susceptible):
221         suceptible of becoming infectious&quot;, fillcolor=wheat, style=&quot;filled,rounded,bold&quot;] ;
222         &quot;E&quot; [shape=&quot;Mrecord&quot;, label=&quot;E&amp;nbsp;&amp;#9719;&quot;, tooltip=&quot;E (Exposed):
223         already infected but not yet able to transmit the disease&quot;, fillcolor=lightcoral, style=&quot;filled,rounded&quot;] ;
224         &quot;I&quot; [shape=&quot;Mrecord&quot;, label=&quot;I&quot;, tooltip=&quot;I (Infectious):
225         sick and able to transmit the disease&quot;, fillcolor=maroon, style=&quot;filled,rounded&quot;] ;
226         &quot;R&quot; [shape=&quot;Mrecord&quot;, label=&quot;R&quot;, tooltip=&quot;R (Resistant):
227         healthy again and resistant to infection&quot;, fillcolor=deepskyblue, style=&quot;filled,rounded&quot;] ;
228         &quot;Q&quot; [shape=&quot;Mrecord&quot;, label=&quot;Q&amp;nbsp;&amp;#9719;&quot;, tooltip=&quot;Q (Quarantine):
229         sick animals that are put aside for a while&quot;, fillcolor=green, style=&quot;filled,rounded&quot;] ;
230         &quot;D&quot; [shape=&quot;Mrecord&quot;, label=&quot;D&quot;, tooltip=&quot;D (Dead):
231         dead animals&quot;, fillcolor=white, style=&quot;filled,rounded,dotted&quot;] ;
232         &quot;E&quot; -&gt; &quot;D&quot; [label=&quot;rate: mortality_sick&quot;, labeltooltip=&quot;mortality_sick [parameter]:
233         mortality rate for sick animals (E / I / Q)                             
234         0.004&quot;, arrowtail=&quot;noneoinv&quot;, arrowhead=&quot;normalnone&quot;, dir=both, tooltip=&quot;ESCAPE: True&quot;, minlen=3, style=&quot;solid&quot;];
235         &quot;E&quot; -&gt; &quot;I&quot; [label=&quot;rate: alpha&quot;, labeltooltip=&quot;alpha [parameter]:
236         rate for E-&gt;I transition                                                
237         0.3&quot;, arrowtail=&quot;none&quot;, arrowhead=&quot;normalnone&quot;, dir=both, tooltip=&quot;&quot;, minlen=3, style=&quot;solid&quot;];
238         &quot;I&quot; -&gt; &quot;D&quot; [label=&quot;rate: mortality_sick&quot;, labeltooltip=&quot;mortality_sick [parameter]:
239         mortality rate for sick animals (E / I / Q)                             
240         0.004&quot;, arrowtail=&quot;none&quot;, arrowhead=&quot;normalnone&quot;, dir=both, tooltip=&quot;&quot;, minlen=3, style=&quot;solid&quot;];
241         &quot;I&quot; -&gt; &quot;Q&quot; [label=&quot;rate: detection&quot;, labeltooltip=&quot;detection [parameter]:
242         rate at which animals are detected sick (falls to 0 if quarantine zone is full) 
243         0.01*room_in_quarantine&quot;, arrowtail=&quot;noneodot&quot;, arrowhead=&quot;normalnone&quot;, dir=both, tooltip=&quot;WHEN: quarantine_period&quot;, minlen=3, style=&quot;solid&quot;];
244         &quot;I&quot; -&gt; &quot;R&quot; [label=&quot;rate: gamma&quot;, labeltooltip=&quot;gamma [parameter]:
245         recovery rate                                                           
246         0.01&quot;, arrowtail=&quot;none&quot;, arrowhead=&quot;normalnone&quot;, dir=both, tooltip=&quot;&quot;, minlen=3, style=&quot;solid&quot;];
247         &quot;M&quot; -&gt; &quot;D&quot; [label=&quot;rate: mortality_healthy&quot;, labeltooltip=&quot;mortality_healthy [parameter]:
248         mortality rate for healthy animals                                      
249         0.002&quot;, arrowtail=&quot;noneoinv&quot;, arrowhead=&quot;normalnone&quot;, dir=both, tooltip=&quot;ESCAPE: True&quot;, minlen=3, style=&quot;solid&quot;];
250         &quot;M&quot; -&gt; &quot;S&quot; [label=&quot;rate: epsilon&quot;, labeltooltip=&quot;epsilon [parameter]:
251         maternal antibodies loss rate                                           
252         0.04&quot;, arrowtail=&quot;none&quot;, arrowhead=&quot;normalnone&quot;, dir=both, tooltip=&quot;&quot;, minlen=3, style=&quot;solid&quot;];
253         &quot;Q&quot; -&gt; &quot;D&quot; [label=&quot;rate: mortality_sick&quot;, labeltooltip=&quot;mortality_sick [parameter]:
254         mortality rate for sick animals (E / I / Q)                             
255         0.004&quot;, arrowtail=&quot;noneoinv&quot;, arrowhead=&quot;normalnone&quot;, dir=both, tooltip=&quot;ESCAPE: True&quot;, minlen=3, style=&quot;solid&quot;];
256         &quot;Q&quot; -&gt; &quot;R&quot; [label=&quot;proba: 1&quot;, labeltooltip=&quot;proba: 1&quot;, arrowtail=&quot;none&quot;, arrowhead=&quot;normalnone&quot;, dir=both, tooltip=&quot;&quot;, minlen=3, style=&quot;solid&quot;];
257         &quot;R&quot; -&gt; &quot;D&quot; [label=&quot;rate: mortality_healthy&quot;, labeltooltip=&quot;mortality_healthy [parameter]:
258         mortality rate for healthy animals                                      
259         0.002&quot;, arrowtail=&quot;none&quot;, arrowhead=&quot;normalnone&quot;, dir=both, tooltip=&quot;&quot;, minlen=3, style=&quot;solid&quot;];
260         &quot;R&quot; -&gt; &quot;S&quot; [label=&quot;rate: delta&quot;, labeltooltip=&quot;delta [parameter]:
261         resistance loss rate                                                    
262         0.01&quot;, arrowtail=&quot;none&quot;, arrowhead=&quot;normalnone&quot;, dir=both, tooltip=&quot;&quot;, minlen=3, style=&quot;solid&quot;];
263         &quot;S&quot; -&gt; &quot;D&quot; [label=&quot;rate: mortality_healthy&quot;, labeltooltip=&quot;mortality_healthy [parameter]:
264         mortality rate for healthy animals                                      
265         0.002&quot;, arrowtail=&quot;none&quot;, arrowhead=&quot;normalnone&quot;, dir=both, tooltip=&quot;&quot;, minlen=3, style=&quot;solid&quot;];
266         &quot;S&quot; -&gt; &quot;E&quot; [label=&quot;rate: f&quot;, labeltooltip=&quot;f [parameter]:
267         force of infection                                                      
268         beta * total_I / total_herd&quot;, arrowtail=&quot;none&quot;, arrowhead=&quot;normalnone&quot;, dir=both, tooltip=&quot;&quot;, minlen=3, style=&quot;solid&quot;];
269 }</p></object>
270 </div>
271 <img alt="../_images/Quickstart_MSEIRQ.png" class="align-left" src="../_images/Quickstart_MSEIRQ.png" />
272 <img alt="../_images/Quickstart_others.png" class="align-left" src="../_images/Quickstart_others.png" />
273 </div>
274 <div class="section" id="alternative-install-with-git">
275 <h2>Alternative: install with <code class="docutils literal notranslate"><span class="pre">git</span></code><a class="headerlink" href="#alternative-install-with-git" title="Permalink to this headline">¶</a></h2>
276 <p>This procedure assumes that you have <code class="docutils literal notranslate"><span class="pre">git</span></code> already
277 <a class="reference external" href="https://git-scm.com/downloads">installed on your system</a>.
278 It is provided here for Linux or MacOS.</p>
279 <ol class="arabic">
280 <li><p class="first">Install (or update) required packages</p>
281 <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo pip3 install numpy scipy matplotlib pandas <span class="s1">&#39;sympy==1.1.1&#39;</span> mpmath
282 sudo pip3 install networkx docopt jinja2 textx
283 sudo pip3 install sortedcontainers tqdm pyyaml colorama
284 sudo pip3 install bokeh sqlalchemy utm
285 </pre></div>
286 </div>
287 </li>
288 <li><p class="first">Clone the EMULSION repository</p>
289 <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>git clone https://git.renater.fr/emulsion-public.git
290 <span class="nb">cd</span> emulsion-public
291 </pre></div>
292 </div>
293 </li>
294 <li><p class="first">Add the local directory and <code class="docutils literal notranslate"><span class="pre">src</span></code> directory to your <code class="docutils literal notranslate"><span class="pre">PYTHONPATH</span></code> environment
295 variable.</p>
296 <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">echo</span> <span class="s2">&quot;export PYTHONPATH=</span><span class="k">$(</span><span class="nb">pwd</span><span class="k">)</span><span class="s2">/src:.&quot;</span> &gt;&gt;<span class="nv">$HOME</span>/.bashrc
297 </pre></div>
298 </div>
299 </li>
300 <li><p class="first">Install command-line completion (optional but very convenient).</p>
301 <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">echo</span> <span class="s2">&quot;source </span><span class="k">$(</span><span class="nb">pwd</span><span class="k">)</span><span class="s2">/src/emulsion/scripts/emulsion-completion.sh&quot;</span> &gt;&gt;<span class="nv">$HOME</span>/.bashrc
302 </pre></div>
303 </div>
304 <p>Command-line completion (available with a bash shell, under Linux
305 or MacOS) allows to use <code class="docutils literal notranslate"><span class="pre">TAB</span></code> key to get suggestions on what is
306 expected (options, files, parameters…) in the command.</p>
307 </li>
308 <li><p class="first">Create command <code class="docutils literal notranslate"><span class="pre">emulsion</span></code>:</p>
309 <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">echo</span> <span class="s2">&quot;alias emulsion=&#39;python3 -m emulsion&#39;&quot;</span> &gt;&gt;<span class="nv">$HOME</span>/.bashrc
310 </pre></div>
311 </div>
312 </li>
313 <li><p class="first">Force the shell to update your init file:</p>
314 <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">source</span> <span class="nv">$HOME</span>/.bashrc
315 </pre></div>
316 </div>
317 </li>
318 </ol>
319 </div>
320 </div>
323           </div>
324         </div>
325       </div>
326       <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
327         <div class="sphinxsidebarwrapper">
328 <h1 class="logo"><a href="../index.html">EMULSION</a></h1>
332 <p class="blurb">Epidemiological Multi-Level Simulation Framework</p>
339 <h3>Navigation</h3>
340 <ul class="current">
341 <li class="toctree-l1 current"><a class="current reference internal" href="#">Installation</a><ul>
342 <li class="toctree-l2"><a class="reference internal" href="#requirements">Requirements</a></li>
343 <li class="toctree-l2"><a class="reference internal" href="#install-with-pip-recommended">Install with <code class="docutils literal notranslate"><span class="pre">pip</span></code> (recommended)</a><ul>
344 <li class="toctree-l3"><a class="reference internal" href="#linux-and-macos">Linux and MacOS:</a></li>
345 <li class="toctree-l3"><a class="reference internal" href="#windows">Windows</a></li>
346 </ul>
347 </li>
348 <li class="toctree-l2"><a class="reference internal" href="#install-third-party-software">Install third-party software</a><ul>
349 <li class="toctree-l3"><a class="reference internal" href="#linux">Linux</a></li>
350 <li class="toctree-l3"><a class="reference internal" href="#macos">MacOS</a></li>
351 <li class="toctree-l3"><a class="reference internal" href="#id1">Windows</a></li>
352 </ul>
353 </li>
354 <li class="toctree-l2"><a class="reference internal" href="#test-your-installation">Test your installation</a></li>
355 <li class="toctree-l2"><a class="reference internal" href="#alternative-install-with-git">Alternative: install with <code class="docutils literal notranslate"><span class="pre">git</span></code></a></li>
356 </ul>
357 </li>
358 <li class="toctree-l1"><a class="reference internal" href="Getting_started.html">Getting started with EMULSION</a></li>
359 <li class="toctree-l1"><a class="reference internal" href="Modelling_principles.html">Modelling principles</a></li>
360 <li class="toctree-l1"><a class="reference internal" href="Modelling_language_basics.html">Modelling language (basics)</a></li>
361 <li class="toctree-l1"><a class="reference internal" href="Modelling_language_advanced.html">Modelling language (advanced)</a></li>
362 <li class="toctree-l1"><a class="reference internal" href="Feature_examples.html">Feature examples</a></li>
363 <li class="toctree-l1"><a class="reference internal" href="Information.html">Information</a></li>
364 <li class="toctree-l1"><a class="reference internal" href="License.html">License</a></li>
365 <li class="toctree-l1"><a class="reference internal" href="../emulsion_for_modellers.html">High-level functions for model designers</a></li>
366 <li class="toctree-l1"><a class="reference internal" href="../emulsion.html">emulsion package</a></li>
367 </ul>
369 <div class="relations">
370 <h3>Related Topics</h3>
371 <ul>
372   <li><a href="../index.html">Documentation overview</a><ul>
373       <li>Previous: <a href="../index.html" title="previous chapter">EMULSION Manual</a></li>
374       <li>Next: <a href="Getting_started.html" title="next chapter">Getting started with EMULSION</a></li>
375   </ul></li>
376 </ul>
377 </div>
378 <div id="searchbox" style="display: none" role="search">
379   <h3>Quick search</h3>
380     <div class="searchformwrapper">
381     <form class="search" action="../search.html" method="get">
382       <input type="text" name="q" />
383       <input type="submit" value="Go" />
384       <input type="hidden" name="check_keywords" value="yes" />
385       <input type="hidden" name="area" value="default" />
386     </form>
387     </div>
388 </div>
389 <script type="text/javascript">$('#searchbox').show(0);</script>
390         </div>
391       </div>
392       <div class="clearer"></div>
393     </div>
394     <div class="footer">
395       &copy;2016, INRA and Univ. Lille.
396       
397       |
398       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.7.5</a>
399       &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.10</a>
400       
401       |
402       <a href="../_sources/pages/Install.rst.txt"
403           rel="nofollow">Page source</a>
404     </div>
406     
408     
409   </body>
410 </html>