Project Installation

Version 248 (Etienne Pallier, 10/01/2016 12:20 pm)

1 1 Etienne Pallier
h1. Project Installation
2 1 Etienne Pallier
3 6 Etienne Pallier
4 189 Etienne Pallier
This page describes the installation phase of the Pyros software
5 189 Etienne Pallier
6 189 Etienne Pallier
7 11 Etienne Pallier
Project Development page : [[Project Development]]
8 11 Etienne Pallier
9 6 Etienne Pallier
HOWTO Format Redmine Wiki : http://www.redmine.org/projects/redmine/wiki/FrRedmineWikiFormatting
10 6 Etienne Pallier
11 193 Etienne Pallier
{{toc}}
12 6 Etienne Pallier
13 6 Etienne Pallier
14 3 Etienne Pallier
---
15 3 Etienne Pallier
16 170 Etienne Pallier
---
17 170 Etienne Pallier
18 221 Etienne Pallier
h2. %{margin-left:0px; font-weight:bold; font-size:25px;  display:block; color:red;}DATABASE SCHEMA (v0.2.2)%
19 4 Etienne Pallier
20 4 Etienne Pallier
21 222 Etienne Pallier
{{thumbnail(PYROS_DBM_V0_2_2.png, size=2000, title=Pyros data model)}}
22 4 Etienne Pallier
23 4 Etienne Pallier
24 4 Etienne Pallier
---
25 5 Etienne Pallier
26 170 Etienne Pallier
---
27 170 Etienne Pallier
28 226 Etienne Pallier
h2. %{margin-left:0px; font-weight:bold; font-size:25px;  display:block; color:red;}COMPATIBLE PLATFORMS (TESTED)%
29 226 Etienne Pallier
30 227 Etienne Pallier
This software is targetted first for Linux CentOS 7 (+ Fedora and Ubuntu), but also for Mac OS X and Windows 10.
31 231 Etienne Pallier
All these systems should run Python 3 (3.5+)
32 226 Etienne Pallier
33 227 Etienne Pallier
Pyros has been tested on these platforms:
34 226 Etienne Pallier
35 232 Etienne Pallier
* CentOS 7.1 (with Python 3.4)
36 235 Paul Carensac
* Linux Mint 17.2 ( == Ubuntu 14.04.3) (with Python 3.5)
37 232 Etienne Pallier
* Mac OS 10.11.6 (with Python 3.5)
38 232 Etienne Pallier
* Windows 10 (with Python 3.5)
39 226 Etienne Pallier
40 177 Etienne Pallier
h2. %{margin-left:0px; font-weight:bold; font-size:25px;  display:block; color:red;}I - PREREQUISITES%
41 177 Etienne Pallier
42 181 Paul Carensac
Pyros needs some prerequisites : 
43 177 Etienne Pallier
44 229 Etienne Pallier
* Python 3.5+
45 181 Paul Carensac
* RabbitMQ
46 220 Etienne Pallier
* [optional] a Mysql Database server (but you can use Sqlite instead, with no installation)
47 177 Etienne Pallier
48 177 Etienne Pallier
49 177 Etienne Pallier
---
50 177 Etienne Pallier
51 230 Etienne Pallier
h3. Install Python3 (3.5+) + pip + virtualenv (only if necessary)
52 177 Etienne Pallier
53 177 Etienne Pallier
_If Python 3 is already installed on your computer, skip this section_
54 177 Etienne Pallier
55 177 Etienne Pallier
56 177 Etienne Pallier
 * Linux (CentOS 7.1, main target): (python35 not yet available as rpm)
57 177 Etienne Pallier
<pre>
58 177 Etienne Pallier
$ sudo yum update yum
59 177 Etienne Pallier
$ sudo yum update kernel
60 177 Etienne Pallier
$ sudo yum update
61 1 Etienne Pallier
62 1 Etienne Pallier
$ sudo yum install python34
63 1 Etienne Pallier
$ python3.4 -V
64 1 Etienne Pallier
Python 3.4.3
65 1 Etienne Pallier
66 1 Etienne Pallier
$ sudo yum install python34-devel
67 1 Etienne Pallier
(needed for python package mysqlclient)
68 1 Etienne Pallier
69 1 Etienne Pallier
$ sudo yum update python-setuptools
70 1 Etienne Pallier
$ easy_install --version
71 1 Etienne Pallier
setuptools 0.9.8
72 1 Etienne Pallier
$ sudo easy_install pip
73 1 Etienne Pallier
$ pip --version
74 1 Etienne Pallier
pip 8.1.1 from /usr/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg (python 2.7)
75 1 Etienne Pallier
76 1 Etienne Pallier
$ sudo pip install virtualenv
77 1 Etienne Pallier
$ virtualenv --version
78 1 Etienne Pallier
15.0.1
79 1 Etienne Pallier
80 1 Etienne Pallier
Necessary for "lxml" python package:
81 1 Etienne Pallier
$ sudo yum install libxml2 libxml2-devel
82 1 Etienne Pallier
$ sudo yum install libxslt libxslt-devel
83 1 Etienne Pallier
84 1 Etienne Pallier
</pre>
85 1 Etienne Pallier
86 1 Etienne Pallier
87 1 Etienne Pallier
 * Linux (Ubuntu) :
88 1 Etienne Pallier
<pre>
89 1 Etienne Pallier
$ sudo add-apt-repository ppa:fkrull/deadsnakes
90 1 Etienne Pallier
$ sudo apt-get update
91 1 Etienne Pallier
$ sudo apt-get install python3.5
92 237 Jeremy Barneron
$ sudo apt-get install libxml2-dev
93 237 Jeremy Barneron
$ sudo apt-get install libxslt-dev
94 1 Etienne Pallier
95 1 Etienne Pallier
$ sudo apt-get install python3.5-dev
96 1 Etienne Pallier
(needed for python package mysqlclient)
97 1 Etienne Pallier
98 1 Etienne Pallier
$ sudo pip install virtualenv
99 1 Etienne Pallier
</pre>
100 1 Etienne Pallier
101 1 Etienne Pallier
102 1 Etienne Pallier
 * Mac OS X :
103 1 Etienne Pallier
104 1 Etienne Pallier
  * From binary (Mac OS native application)
105 1 Etienne Pallier
(TODO:)
106 1 Etienne Pallier
107 1 Etienne Pallier
  * From MacPort
108 1 Etienne Pallier
109 1 Etienne Pallier
   * a) install macport
110 208 Etienne Pallier
cf https://www.macports.org/install.php
111 1 Etienne Pallier
112 1 Etienne Pallier
   * b) install the "port" python35
113 1 Etienne Pallier
<pre>
114 1 Etienne Pallier
$ sudo port install python35
115 1 Etienne Pallier
</pre>
116 1 Etienne Pallier
117 1 Etienne Pallier
118 202 Paul Carensac
 * Windows (tested with Windows 7 & 10) :
119 1 Etienne Pallier
<pre>
120 1 Etienne Pallier
Go to https://www.python.org/downloads/windows/ , choose the wanted version
121 1 Etienne Pallier
On the wanted version’s page, download Windows x86 executable installer
122 1 Etienne Pallier
123 1 Etienne Pallier
Run the executable
124 1 Etienne Pallier
    * On the first page, check "Add python3.5 to PATH"
125 1 Etienne Pallier
    * Choose "Install now" option
126 1 Etienne Pallier
127 1 Etienne Pallier
Open cmd (windows + R, cmd) :
128 1 Etienne Pallier
 $ python -m pip install --upgrade pip
129 1 Etienne Pallier
 $ pip install virtualenv
130 1 Etienne Pallier
</pre>
131 200 Paul Carensac
132 200 Paul Carensac
---
133 200 Paul Carensac
134 200 Paul Carensac
h3. Install a database server (only if necessary)
135 200 Paul Carensac
136 200 Paul Carensac
_If the MySql database server is already installed on your computer, skip this section_
137 200 Paul Carensac
138 200 Paul Carensac
By default, Pyros uses Mysql, but this implies that you have to install the Mysql database server...
139 200 Paul Carensac
140 200 Paul Carensac
Thus, to make things easier, avoid Mysql installation by using Sqlite instead as the database server (which will need no installation at all) :
141 200 Paul Carensac
142 200 Paul Carensac
=> *For this, just edit the file PYROS/src/pyros/settings.py and set MYSQL variable to False, and that's it. You can go to next section*
143 200 Paul Carensac
144 200 Paul Carensac
Now, if you really want to use Mysql (which is the default), you will need to install it (only if not already installed), so keep reading.
145 200 Paul Carensac
146 200 Paul Carensac
_(Skip this if you are using Sqlite instead of MySql)_
147 200 Paul Carensac
148 200 Paul Carensac
 * Linux Ubuntu
149 200 Paul Carensac
<pre>
150 200 Paul Carensac
First, update your system:
151 200 Paul Carensac
$ sudo apt-get update
152 200 Paul Carensac
153 200 Paul Carensac
$ sudo apt-get install mysql-server
154 200 Paul Carensac
$ sudo apt-get install mysql-client
155 200 Paul Carensac
156 200 Paul Carensac
$ sudo apt-get install libmysqlclient-dev
157 200 Paul Carensac
(needed for python package mysqlclient)
158 200 Paul Carensac
</pre>
159 200 Paul Carensac
160 200 Paul Carensac
 * Linux CentOS : cf https://www.howtoforge.com/apache_php_mysql_on_centos_7_lamp#-installing-mysql-
161 200 Paul Carensac
<pre>
162 200 Paul Carensac
First, update your system:
163 200 Paul Carensac
$ sudo yum update yum
164 200 Paul Carensac
$ sudo yum update kernel
165 200 Paul Carensac
$ sudo yum update
166 200 Paul Carensac
167 200 Paul Carensac
$ sudo yum install mariadb-server 
168 200 Paul Carensac
$ sudo yum install mariadb
169 200 Paul Carensac
170 200 Paul Carensac
$ sudo yum install mariadb-devel
171 200 Paul Carensac
(needed for python package mysqlclient)
172 200 Paul Carensac
173 200 Paul Carensac
$ sudo systemctl start mariadb.service
174 200 Paul Carensac
175 200 Paul Carensac
$ sudo systemctl enable mariadb.service
176 200 Paul Carensac
=> Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
177 200 Paul Carensac
178 200 Paul Carensac
$ sudo mysql_secure_installation
179 200 Paul Carensac
</pre>
180 200 Paul Carensac
181 200 Paul Carensac
 * Mac OS X
182 200 Paul Carensac
Install XAMPP
183 200 Paul Carensac
(but you could also use the pre-installed Mac OS MySql, or install MySql from macport)
184 209 Etienne Pallier
cf https://www.apachefriends.org/fr/index.html
185 209 Etienne Pallier
186 200 Paul Carensac
187 201 Paul Carensac
 * Windows (tested with Windows 7 & 10)
188 200 Paul Carensac
189 200 Paul Carensac
<pre>
190 200 Paul Carensac
Download and install the newest version on https://dev.mysql.com/downloads/installer/
191 200 Paul Carensac
192 200 Paul Carensac
Once installed, launch MySQL Installer. Clic on 'Add...' on the right.
193 200 Paul Carensac
In MySQLServers section, choose the newest, then clic on next.
194 200 Paul Carensac
Install and configure the server (just follow the installation guide).
195 200 Paul Carensac
196 200 Paul Carensac
Then launch mysql (via the Windows menu).
197 200 Paul Carensac
</pre>
198 200 Paul Carensac
199 177 Etienne Pallier
200 1 Etienne Pallier
---
201 181 Paul Carensac
202 181 Paul Carensac
h3. Install RabbitMQ
203 181 Paul Carensac
204 181 Paul Carensac
RabbitMQ is a message queue server used by Celery to handle tasks queues.
205 248 Etienne Pallier
It uses the amqp protocol to manage queue messages.
206 181 Paul Carensac
207 181 Paul Carensac
 * Ubuntu (the server is automatically started) :
208 181 Paul Carensac
<pre>
209 181 Paul Carensac
$ sudo apt-get install rabbitmq-server
210 245 Etienne Pallier
211 245 Etienne Pallier
Get status:
212 245 Etienne Pallier
$ sudo invoke-rc.d rabbitmq-server status
213 245 Etienne Pallier
214 245 Etienne Pallier
Stop:
215 245 Etienne Pallier
$ sudo invoke-rc.d rabbitmq-server stop
216 245 Etienne Pallier
217 245 Etienne Pallier
Start:
218 245 Etienne Pallier
$ sudo invoke-rc.d rabbitmq-server start
219 245 Etienne Pallier
220 181 Paul Carensac
</pre>
221 245 Etienne Pallier
222 245 Etienne Pallier
223 183 Paul Carensac
224 195 Etienne Pallier
 * CentOS :
225 195 Etienne Pallier
<pre>
226 195 Etienne Pallier
$ sudo yum install rabbitmq-server
227 196 Etienne Pallier
228 196 Etienne Pallier
Installation :
229 196 Etienne Pallier
 rabbitmq-server                                                           noarch                          3.3.5-17.el7
230 196 Etienne Pallier
Installation pour dépendances :
231 196 Etienne Pallier
 erlang-asn1                                                               x86_64                          R16B-03.16.el7
232 246 Etienne Pallier
233 246 Etienne Pallier
Get status:
234 247 Etienne Pallier
(CentOS7) $ sudo rabbitmqctl status
235 247 Etienne Pallier
(older CentOS) $ sudo /sbin/service rabbitmq-server status
236 1 Etienne Pallier
237 1 Etienne Pallier
Stop:
238 247 Etienne Pallier
(CentOS7) $ sudo systemctl stop rabbitmq-server
239 247 Etienne Pallier
(older CentOS) $ sudo /sbin/service rabbitmq-server stop
240 1 Etienne Pallier
241 246 Etienne Pallier
Start:
242 247 Etienne Pallier
(CentOS7) $ sudo systemctl start rabbitmq-server
243 247 Etienne Pallier
(older CentOS) $ sudo /sbin/service rabbitmq-server start
244 195 Etienne Pallier
</pre>
245 195 Etienne Pallier
246 183 Paul Carensac
 * MacOS :
247 183 Paul Carensac
<pre>
248 194 Etienne Pallier
With MacPort:
249 194 Etienne Pallier
$ sudo port install rabbitmq-server
250 194 Etienne Pallier
--->  Installing erlang @18.2.1_1+hipe+ssl
251 194 Etienne Pallier
...
252 1 Etienne Pallier
--->  Installing rabbitmq-server @3.5.7_0
253 1 Etienne Pallier
--->  Activating rabbitmq-server @3.5.7_0
254 1 Etienne Pallier
...
255 247 Etienne Pallier
256 247 Etienne Pallier
Get status:
257 247 Etienne Pallier
$ sudo rabbitmqctl status
258 183 Paul Carensac
259 240 Etienne Pallier
To start rabbitmq : 
260 240 Etienne Pallier
$ sudo rabbitmq-server
261 244 Etienne Pallier
262 244 Etienne Pallier
To stop rabbitmq : 
263 244 Etienne Pallier
$ sudo rabbitmqctl stop
264 240 Etienne Pallier
</pre>
265 244 Etienne Pallier
266 240 Etienne Pallier
267 240 Etienne Pallier
268 183 Paul Carensac
 * Windows :
269 191 Paul Carensac
270 191 Paul Carensac
  * Take the wanted Erlang version at http://www.erlang.org/downloads and install it (required)
271 191 Paul Carensac
  * Take the wanted RabbitMQ version at https://www.rabbitmq.com/install-windows.html and install it. Then the server will run automatically
272 191 Paul Carensac
273 191 Paul Carensac
274 177 Etienne Pallier
275 177 Etienne Pallier
---
276 177 Etienne Pallier
277 179 Etienne Pallier
h2. %{margin-left:0px; font-weight:bold; font-size:25px;  display:block; color:red;}II - GET THE PYROS SOFTWARE%
278 5 Etienne Pallier
279 125 Etienne Pallier
h3. Authenticate to https://gitlab.irap.omp.eu/epallier/pyros
280 125 Etienne Pallier
281 125 Etienne Pallier
In order to get this software, you must first authenticate on the IRAP gitlab.
282 125 Etienne Pallier
283 125 Etienne Pallier
For this, just go to https://gitlab.irap.omp.eu/epallier/pyros
284 125 Etienne Pallier
and either sign in with your LDAP account (if you are from IRAP),
285 125 Etienne Pallier
or register via the "Sign up" form.
286 5 Etienne Pallier
287 113 Etienne Pallier
h3. Software structure
288 5 Etienne Pallier
289 207 Paul Carensac
See [[Project_structure|Project Structure]] page.
290 1 Etienne Pallier
291 112 Etienne Pallier
h3. Browse the code (from gitlab)
292 111 Etienne Pallier
293 111 Etienne Pallier
https://gitlab.irap.omp.eu/epallier/pyros/tree/master
294 111 Etienne Pallier
295 203 Paul Carensac
h3. You can download it (static version, not synchronized)
296 111 Etienne Pallier
297 114 Etienne Pallier
You can download the current version of the software.
298 114 Etienne Pallier
299 115 Etienne Pallier
Go to https://gitlab.irap.omp.eu/epallier/pyros/tree/master
300 115 Etienne Pallier
301 115 Etienne Pallier
Click on "Download zip" on the up right hand corner.
302 115 Etienne Pallier
303 115 Etienne Pallier
Double-click on it to unzip it.
304 115 Etienne Pallier
305 115 Etienne Pallier
You should get a "pyros.git" folder.
306 115 Etienne Pallier
307 116 Etienne Pallier
In this documentation, this software folder will be referenced as "PYROS".
308 115 Etienne Pallier
309 118 Etienne Pallier
(you can rename "pyros.git" as "PYROS" if you want : "mv pyros.git PYROS")
310 114 Etienne Pallier
311 203 Paul Carensac
h3. (Windows developers only) : Get git for Windows
312 1 Etienne Pallier
313 203 Paul Carensac
 * Download git at https://git-scm.com/download/win
314 203 Paul Carensac
 * Run setup (keep default configurations)
315 203 Paul Carensac
 * Once installed, open cmd
316 203 Paul Carensac
<pre>
317 203 Paul Carensac
$ git config --global http.sslVerify false
318 203 Paul Carensac
</pre>
319 203 Paul Carensac
320 203 Paul Carensac
You can now use your git from the cmd or the graphic client !
321 203 Paul Carensac
322 203 Paul Carensac
h3. (Developers only) Get it from GIT (dynamic version, synchronized)
323 203 Paul Carensac
324 122 Etienne Pallier
(If you are using Windows, you must first get the git software, see below "Get git for Windows")
325 122 Etienne Pallier
326 114 Etienne Pallier
By getting the software from git, you will get a dynamically synchronized version,
327 114 Etienne Pallier
which means that you will be able to update your version as soon as a new version is available
328 114 Etienne Pallier
(with the command : "git pull").
329 111 Etienne Pallier
330 111 Etienne Pallier
* From Eclipse : See below, section "NOTES FOR ECLIPSE USERS"
331 111 Etienne Pallier
332 111 Etienne Pallier
* From the terminal
333 5 Etienne Pallier
334 5 Etienne Pallier
<pre>
335 5 Etienne Pallier
git clone https://gitlab.irap.omp.eu/epallier/pyros.git PYROS
336 1 Etienne Pallier
</pre>
337 86 Etienne Pallier
338 86 Etienne Pallier
_(or also : git clone git@gitlab.irap.omp.eu:epallier/pyros.git PYROS)_
339 5 Etienne Pallier
340 5 Etienne Pallier
If you ever get this error message :
341 1 Etienne Pallier
<pre>
342 1 Etienne Pallier
fatal: unable to access 'https://gitlab.irap.omp.eu/epallier/pyros.git/': Peer's certificate issuer has been marked as not trusted by the user.
343 122 Etienne Pallier
</pre>
344 122 Etienne Pallier
345 122 Etienne Pallier
Then, type this command (and then run again the git clone command):
346 121 Paul Carensac
<pre>
347 121 Paul Carensac
$ git config --global http.sslVerify false
348 121 Paul Carensac
</pre>
349 121 Paul Carensac
350 1 Etienne Pallier
(Also, the first time you get the project, it will ask you for a login and password)
351 121 Paul Carensac
352 168 Etienne Pallier
This creates a PYROS/ folder containing the project (with a .git/ subfolder for synchronization with the git repository)
353 168 Etienne Pallier
354 168 Etienne Pallier
355 169 Etienne Pallier
356 169 Etienne Pallier
357 169 Etienne Pallier
---
358 169 Etienne Pallier
359 169 Etienne Pallier
---
360 169 Etienne Pallier
361 186 Paul Carensac
h2. %{margin-left:0px; font-weight:bold; font-size:25px;  display:block; color:red;}III - INSTALLATION OF NEEDED PROJECT DEPENDENCIES%
362 166 Etienne Pallier
363 186 Paul Carensac
---
364 186 Paul Carensac
365 186 Paul Carensac
h3. Install Comet
366 186 Paul Carensac
367 214 Etienne Pallier
Comet is needed as a broker to receive and send VOEvents (https://github.com/jdswinbank/Comet/tree/py3)
368 213 Etienne Pallier
*You MUST have your virtualenv activated (source venv_py3_pyros/bin/activate in your 'private/' directory)*
369 1 Etienne Pallier
Documentation is available here : http://comet.readthedocs.io/en/stable/installation.html
370 213 Etienne Pallier
(see also http://voevent.readthedocs.io/en/latest/setup.html)
371 186 Paul Carensac
372 212 Etienne Pallier
* Ubuntu :
373 186 Paul Carensac
374 186 Paul Carensac
<pre>
375 186 Paul Carensac
# You can do this anywhere on your computer
376 1 Etienne Pallier
$ git clone https://github.com/jdswinbank/Comet.git
377 1 Etienne Pallier
$ cd Comet
378 1 Etienne Pallier
$ (sudo ?) python setup.py install
379 236 Jeremy Barneron
$ sudo apt-get install python-lxml
380 1 Etienne Pallier
381 1 Etienne Pallier
# Now you can test it, no failure are expected, please contact the dev team for help
382 213 Etienne Pallier
$ twistd comet --help
383 1 Etienne Pallier
$ trial comet
384 213 Etienne Pallier
All tests should pass
385 1 Etienne Pallier
</pre>
386 1 Etienne Pallier
387 212 Etienne Pallier
388 1 Etienne Pallier
* MacOS :
389 1 Etienne Pallier
<pre>
390 213 Etienne Pallier
Idem Ubuntu
391 1 Etienne Pallier
</pre>
392 1 Etienne Pallier
393 212 Etienne Pallier
* Windows :
394 1 Etienne Pallier
<pre>
395 212 Etienne Pallier
TODO:
396 212 Etienne Pallier
</pre>
397 212 Etienne Pallier
398 212 Etienne Pallier
399 212 Etienne Pallier
400 212 Etienne Pallier
401 212 Etienne Pallier
402 190 Paul Carensac
403 190 Paul Carensac
---
404 190 Paul Carensac
405 211 Etienne Pallier
h3. Install the other project dependencies and the database (within a Python virtual environment)
406 190 Paul Carensac
407 190 Paul Carensac
Go into the PYROS/install/ folder and Run the install_requirements.sh script.
408 190 Paul Carensac
409 190 Paul Carensac
(You will be prompted to enter a username, an email, and a password for the superuser)
410 190 Paul Carensac
411 190 Paul Carensac
* Mac and Linux:
412 190 Paul Carensac
<pre>
413 190 Paul Carensac
./install_requirements.sh
414 190 Paul Carensac
</pre>
415 190 Paul Carensac
416 190 Paul Carensac
* Windows:
417 190 Paul Carensac
<pre>
418 190 Paul Carensac
install_requirements_windows.bat
419 190 Paul Carensac
</pre>
420 190 Paul Carensac
421 190 Paul Carensac
_If something goes wrong, install manually each package (see section "MANUAL INSTALLATION OF PYTHON PACKAGES, ONE BY ONE")_
422 186 Paul Carensac
423 98 Etienne Pallier
424 9 Etienne Pallier
---
425 9 Etienne Pallier
426 9 Etienne Pallier
h3. (Eclipse only) Set the Python3 virtual environment as the project interpreter
427 9 Etienne Pallier
428 65 Etienne Pallier
See below, in section "NOTES FOR ECLIPSE USERS"
429 9 Etienne Pallier
430 1 Etienne Pallier
---
431 1 Etienne Pallier
432 170 Etienne Pallier
---
433 170 Etienne Pallier
434 17 Etienne Pallier
h2. %{margin-left:0px; font-weight:bold; font-size:25px;  display:block; color:red;}IV - TEST%
435 17 Etienne Pallier
436 108 Etienne Pallier
437 90 Etienne Pallier
(Tests are classes declared in all apps' test.py file. The test classes inherit from django.test.TestCase)
438 17 Etienne Pallier
439 17 Etienne Pallier
You can run the tests suite, just to be sure that the software is well installed.
440 17 Etienne Pallier
441 19 Etienne Pallier
h3. From Terminal
442 19 Etienne Pallier
443 19 Etienne Pallier
444 1 Etienne Pallier
<pre>
445 1 Etienne Pallier
446 219 Paul Carensac
$ cd PYROS/
447 94 Etienne Pallier
448 243 Etienne Pallier
Be sure that at least unit tests pass:
449 243 Etienne Pallier
$ ./pyrosrun.sh unittest
450 243 Etienne Pallier
451 243 Etienne Pallier
If unit tests pass, then run ALL tests:
452 219 Paul Carensac
$ ./pyrosrun.sh test_all
453 242 Etienne Pallier
454 242 Etienne Pallier
NB: if tests do not pass, be sure that Rabbitmq is launched:
455 242 Etienne Pallier
To start rabbitmq on MacOS : 
456 242 Etienne Pallier
$ sudo rabbitmq-server
457 242 Etienne Pallier
458 17 Etienne Pallier
</pre>
459 19 Etienne Pallier
460 160 Paul Carensac
h3. From Eclipse
461 1 Etienne Pallier
462 216 Etienne Pallier
Right-clic on the project / Django / Run Django tests
463 1 Etienne Pallier
464 216 Etienne Pallier
(for more information, see below, in section "NOTES FOR ECLIPSE USERS")
465 25 Paul Carensac
466 160 Paul Carensac
h3. Custom commands
467 27 Paul Carensac
468 25 Paul Carensac
$ [./manage.py] test app.tests                           # Run tests for the application 'app'
469 25 Paul Carensac
$ [./manage.py] test app.tests.ModelTests                # Run test methods declared in the class app.tests.ModelTests
470 25 Paul Carensac
$ [./manage.py] test app.tests.ModelTests.test_method    # Only run the method test_method declared in app.tests.ModelTests
471 33 Etienne Pallier
472 33 Etienne Pallier
473 1 Etienne Pallier
---
474 1 Etienne Pallier
475 170 Etienne Pallier
---
476 170 Etienne Pallier
477 92 Etienne Pallier
h2. %{margin-left:0px; font-weight:bold; font-size:25px;  display:block; color:red;}V - RUN%
478 75 Etienne Pallier
479 109 Etienne Pallier
480 223 Etienne Pallier
Before launching Pyros, check that all the pre-requisites are running :
481 223 Etienne Pallier
482 223 Etienne Pallier
 * RabbitMQ: 
483 223 Etienne Pallier
<pre>
484 223 Etienne Pallier
$ systemctl status rabbitmq-server
485 223 Etienne Pallier
486 223 Etienne Pallier
If inactive, start it:
487 223 Etienne Pallier
$ sudo systemctl start rabbitmq-server
488 223 Etienne Pallier
489 224 Etienne Pallier
(To stop it, use "stop" instead of "start")
490 223 Etienne Pallier
491 223 Etienne Pallier
</pre>
492 223 Etienne Pallier
493 223 Etienne Pallier
 * Mysql (only if you are not using Sqlite):
494 225 Etienne Pallier
<pre>
495 225 Etienne Pallier
$ systemctl status mysqld
496 225 Etienne Pallier
497 225 Etienne Pallier
If inactive, start it:
498 225 Etienne Pallier
$ sudo systemctl start mysqld
499 225 Etienne Pallier
500 225 Etienne Pallier
(To stop it, use "stop" instead of "start")
501 225 Etienne Pallier
</pre>
502 223 Etienne Pallier
503 75 Etienne Pallier
* From the terminal
504 75 Etienne Pallier
505 75 Etienne Pallier
<pre>
506 75 Etienne Pallier
507 95 Etienne Pallier
$ cd PYROS/
508 1 Etienne Pallier
509 158 Paul Carensac
$ ./pyrosrun server
510 217 Etienne Pallier
511 217 Etienne Pallier
(To check that this service is actually running, type "$ netstat -an |grep 8000" and you should get "tcp        0      0 127.0.0.1:8000          0.0.0.0:*               LISTEN")
512 217 Etienne Pallier
513 218 Etienne Pallier
(Use instead "python manage.py runserver YOUR_IP_ADDRESS:8000" if you want to access the website from another pc with http://YOUR_IP_ADDRESS:8000) (from within a virtual env, and from src/)
514 217 Etienne Pallier
515 93 Paul Carensac
</pre>
516 75 Etienne Pallier
517 158 Paul Carensac
Now, go to "http://localhost:8000/admin" in your browser
518 91 Etienne Pallier
519 158 Paul Carensac
(and login as "pyros" with the password 'DjangoPyros')
520 105 Etienne Pallier
521 91 Etienne Pallier
(Ctrl-c to stop)
522 91 Etienne Pallier
523 91 Etienne Pallier
524 75 Etienne Pallier
525 106 Etienne Pallier
* From Eclipse : see below, in section "NOTES FOR ECLIPSE USERS"
526 75 Etienne Pallier
527 75 Etienne Pallier
528 1 Etienne Pallier
---
529 1 Etienne Pallier
530 170 Etienne Pallier
---
531 170 Etienne Pallier
532 33 Etienne Pallier
h2. %{margin-left:0px; font-weight:bold; font-size:25px;  display:block; color:red;}NOTES FOR ECLIPSE USERS%
533 35 Etienne Pallier
534 35 Etienne Pallier
0) Install Eclipse (if necessary)
535 35 Etienne Pallier
536 35 Etienne Pallier
Get the Eclipse version for Php
537 35 Etienne Pallier
538 35 Etienne Pallier
Install the plug-in pydev (via install new software, add http://pydev.org/updates)
539 35 Etienne Pallier
540 35 Etienne Pallier
Install the django template editor (via install new software, add http://eclipse.kacprzak.org/updates)
541 35 Etienne Pallier
542 35 Etienne Pallier
1) Deactivate CA certificate verification
543 35 Etienne Pallier
544 35 Etienne Pallier
Window -> Preferences -> Team -> git -> configuration -> Add entry
545 35 Etienne Pallier
546 35 Etienne Pallier
Key = http.sslVerify
547 35 Etienne Pallier
Value = false
548 35 Etienne Pallier
549 35 Etienne Pallier
2) Fetch the project
550 35 Etienne Pallier
551 35 Etienne Pallier
File/Import project from git
552 35 Etienne Pallier
553 35 Etienne Pallier
Select repository source: Clone URI: https://gitlab.irap.omp.eu/epallier/pyros.git
554 35 Etienne Pallier
555 35 Etienne Pallier
Directory: 
556 35 Etienne Pallier
par défaut, il propose : /Users/epallier/git/pyros
557 35 Etienne Pallier
mais on peut le mettre ailleurs (c'est ce que j'ai fait)
558 35 Etienne Pallier
559 35 Etienne Pallier
initial branch: master
560 35 Etienne Pallier
remote name: origin
561 35 Etienne Pallier
562 35 Etienne Pallier
Import as general project
563 35 Etienne Pallier
564 35 Etienne Pallier
Project name: PYROS
565 35 Etienne Pallier
566 35 Etienne Pallier
567 35 Etienne Pallier
3) Configure the project
568 35 Etienne Pallier
569 35 Etienne Pallier
The project is created. Now, you have to set it as a «PyDev » and a « Django » project.
570 35 Etienne Pallier
571 35 Etienne Pallier
clic droit sur le projet / PyDev / set as a PyDev project
572 35 Etienne Pallier
573 35 Etienne Pallier
clic droit sur le projet / PyDev / set as a Django project
574 35 Etienne Pallier
575 35 Etienne Pallier
clic droit sur le projet : on doit maintenant avoir un sous-menu Django
576 35 Etienne Pallier
577 35 Etienne Pallier
clic droit sur le dossier src / PyDev / set as source folder (add to PYTHONPATH)
578 35 Etienne Pallier
579 35 Etienne Pallier
clic droit sur projet / Properties / Pydev-Django :
580 215 Etienne Pallier
  - *Django manage.py : src/manage.py*
581 215 Etienne Pallier
  - *Django settings module : pyros.settings*
582 35 Etienne Pallier
583 35 Etienne Pallier
584 35 Etienne Pallier
4) Set Code style
585 35 Etienne Pallier
586 35 Etienne Pallier
Window/Preferences : Pydev / Editor
587 35 Etienne Pallier
- Auto Imports : uncheck « Do auto import »
588 35 Etienne Pallier
- Code style:
589 35 Etienne Pallier
	- Locals … : camelCase
590 35 Etienne Pallier
	- Methods : camelCase() with first lower
591 35 Etienne Pallier
- Code style / Code Formatter: activer « use autopep8.py for code formatting »
592 35 Etienne Pallier
- Tabs : Tab length : 4
593 35 Etienne Pallier
594 67 Etienne Pallier
5) Now, once the Python3 virtual environment is installed (see above),
595 66 Etienne Pallier
set it in Eclipse as the project interpreter:
596 66 Etienne Pallier
597 68 Etienne Pallier
Right clic on the project / Properties / PyDev - Interpreter/Grammar :
598 66 Etienne Pallier
Grammar version : 3
599 66 Etienne Pallier
600 66 Etienne Pallier
Interpreter : click on « click here to configure an interpreter not listed »
601 66 Etienne Pallier
602 66 Etienne Pallier
click on « New... » :
603 66 Etienne Pallier
- Interpreter name : venv_py35_pyros
604 66 Etienne Pallier
- Interpreter executable : click on « Browse »
605 66 Etienne Pallier
	Select your virtualenv python35 executable (private/venv_py35_pyros/bin/python3.5)
606 66 Etienne Pallier
	click OK
607 66 Etienne Pallier
608 66 Etienne Pallier
*Now, a last thing to do so that Pydev finds Django:*
609 66 Etienne Pallier
610 66 Etienne Pallier
In the Python interpreters list, select your virtual env (venv_py35_pyros)
611 66 Etienne Pallier
612 66 Etienne Pallier
Click on the tab "Libraries"
613 66 Etienne Pallier
614 66 Etienne Pallier
clic on 'New folder', then select your virtualenv's lib/python3.5/site-packages folder
615 66 Etienne Pallier
616 66 Etienne Pallier
OK
617 66 Etienne Pallier
618 66 Etienne Pallier
Interpreter: select now venv_py35_pyros from the list
619 66 Etienne Pallier
620 66 Etienne Pallier
OK
621 62 Etienne Pallier
622 78 Etienne Pallier
6) Test
623 1 Etienne Pallier
624 78 Etienne Pallier
* Right-clic on the project / Django / Run Django tests
625 78 Etienne Pallier
626 78 Etienne Pallier
* Right-clic on the project / Django / Custom command / ...
627 78 Etienne Pallier
628 78 Etienne Pallier
629 78 Etienne Pallier
7) Run
630 70 Etienne Pallier
631 70 Etienne Pallier
Right clic on project -> Django/Custom command/runserver
632 70 Etienne Pallier
633 70 Etienne Pallier
Error on Ubuntu :
634 70 Etienne Pallier
635 70 Etienne Pallier
<pre>
636 70 Etienne Pallier
637 70 Etienne Pallier
Traceback (most recent call last):
638 70 Etienne Pallier
  File "/home/carens_p/git/pyros/src/manage.py", line 8, in <module>
639 70 Etienne Pallier
    from django.core.management import execute_from_command_line
640 70 Etienne Pallier
ImportError: No module named 'django'
641 70 Etienne Pallier
642 70 Etienne Pallier
</pre>
643 70 Etienne Pallier
644 70 Etienne Pallier
Project -> Properties -> Pydev interpreter -> Clic here to configure an interpreter not listed
645 70 Etienne Pallier
646 70 Etienne Pallier
select venv_py35_pyros
647 70 Etienne Pallier
648 70 Etienne Pallier
In Libraries, clic on 'New folder', then select your virtualenv's lib/python3.5/site-packages folder.
649 70 Etienne Pallier
650 70 Etienne Pallier
OK -> re-select venv_py35_pyros in 'Interpreter' dropdown menu
651 70 Etienne Pallier
652 70 Etienne Pallier
Then right clic on project -> Django/Custom command/runserver
653 70 Etienne Pallier
654 70 Etienne Pallier
check http://localhost:8000/
655 70 Etienne Pallier
656 70 Etienne Pallier
657 62 Etienne Pallier
---
658 62 Etienne Pallier
659 62 Etienne Pallier
---
660 62 Etienne Pallier
661 81 Etienne Pallier
h2. %{margin-left:0px; font-weight:bold; font-size:25px;  display:block; color:red;}MANUAL INSTALLATION OF PYTHON PACKAGES ONE BY ONE%
662 81 Etienne Pallier
663 172 Etienne Pallier
*Follow these steps only if the previous guided and nearly automatic installation did not work for you*
664 100 Etienne Pallier
665 172 Etienne Pallier
666 174 Etienne Pallier
h3. (Only if using Mysql) Create the database "pyros" and the pyros user
667 174 Etienne Pallier
668 174 Etienne Pallier
Only if you are using Mysql, you need to create an empty database "pyros"
669 174 Etienne Pallier
(which will be filled automatically by django)
670 174 Etienne Pallier
671 174 Etienne Pallier
<pre>
672 174 Etienne Pallier
$ mysql -u root -p
673 174 Etienne Pallier
(enter your root password)
674 174 Etienne Pallier
675 174 Etienne Pallier
$ mysql> create database if not exists pyros;
676 174 Etienne Pallier
</pre>
677 174 Etienne Pallier
678 174 Etienne Pallier
The user creation depends on your MySQL version :
679 174 Etienne Pallier
680 174 Etienne Pallier
 * 5.7 and above :
681 174 Etienne Pallier
<pre>
682 174 Etienne Pallier
$ mysql> DROP USER IF EXISTS pyros;
683 174 Etienne Pallier
$ mysql> CREATE USER 'pyros' IDENTIFIED BY 'DjangoPyros';
684 174 Etienne Pallier
$ mysql> GRANT ALL PRIVILEGES ON pyros.* TO pyros;
685 174 Etienne Pallier
</pre>
686 174 Etienne Pallier
687 174 Etienne Pallier
 * under 5.7 :
688 174 Etienne Pallier
<pre>
689 174 Etienne Pallier
$ mysql> GRANT USAGE ON *.* TO 'pyros';
690 174 Etienne Pallier
$ mysql> DROP USER 'pyros';
691 174 Etienne Pallier
$ mysql> CREATE USER 'pyros' IDENTIFIED BY 'DjangoPyros';
692 174 Etienne Pallier
$ mysql> GRANT ALL PRIVILEGES ON pyros.* TO pyros;
693 174 Etienne Pallier
</pre>
694 174 Etienne Pallier
695 174 Etienne Pallier
If none of these solution work, check on the internet to create a user named pyros with the password DjangoPyros.
696 174 Etienne Pallier
697 100 Etienne Pallier
h3. Create a Python3 virtual environment dedicated to the project (inside the project folder)
698 100 Etienne Pallier
699 100 Etienne Pallier
<pre>
700 100 Etienne Pallier
701 100 Etienne Pallier
$ mkdir private/
702 100 Etienne Pallier
703 100 Etienne Pallier
$ cd private/
704 100 Etienne Pallier
705 100 Etienne Pallier
$ which python3.5 ("where python" for windows)
706 100 Etienne Pallier
/opt/local/bin/python3.5
707 100 Etienne Pallier
708 100 Etienne Pallier
$ virtualenv venv_py35_pyros -p /opt/local/bin/python3.5
709 100 Etienne Pallier
=> creates a venv_py35_pyros/ folder inside PYROS/private/
710 100 Etienne Pallier
711 100 Etienne Pallier
</pre>
712 100 Etienne Pallier
713 100 Etienne Pallier
714 100 Etienne Pallier
---
715 100 Etienne Pallier
716 100 Etienne Pallier
h3. Activate the python virtual environment (from inside the project)
717 100 Etienne Pallier
718 100 Etienne Pallier
<pre>
719 100 Etienne Pallier
720 100 Etienne Pallier
$ pwd
721 100 Etienne Pallier
.../PYROS/private
722 100 Etienne Pallier
723 100 Etienne Pallier
$ source ./venv_py35_pyros/bin/activate (venv_py35_pyros/Scripts/activate on Windows)
724 100 Etienne Pallier
725 100 Etienne Pallier
</pre>
726 100 Etienne Pallier
727 100 Etienne Pallier
---
728 100 Etienne Pallier
729 100 Etienne Pallier
h3. Install needed python packages
730 100 Etienne Pallier
731 81 Etienne Pallier
Check that the virtual environment is activated
732 81 Etienne Pallier
<pre>
733 81 Etienne Pallier
$ python -V
734 81 Etienne Pallier
Python 3...
735 81 Etienne Pallier
736 81 Etienne Pallier
$ which pip
737 81 Etienne Pallier
.../PYROS/venv_py35_pyros/bin/pip
738 81 Etienne Pallier
</pre>
739 81 Etienne Pallier
740 81 Etienne Pallier
741 81 Etienne Pallier
Upgrade pip to last version available:
742 81 Etienne Pallier
<pre>
743 81 Etienne Pallier
$ pip install --upgrade pip
744 81 Etienne Pallier
Collecting pip
745 81 Etienne Pallier
  Downloading pip-8.1.1-py2.py3-none-any.whl (1.2MB)
746 81 Etienne Pallier
Installing collected packages: pip
747 81 Etienne Pallier
  Found existing installation: pip 7.1.2
748 81 Etienne Pallier
    Uninstalling pip-7.1.2:
749 81 Etienne Pallier
      Successfully uninstalled pip-7.1.2
750 81 Etienne Pallier
Successfully installed pip-8.1.1
751 81 Etienne Pallier
752 81 Etienne Pallier
Upgrade wheel to last version available:
753 81 Etienne Pallier
$ pip install --upgrade wheel
754 81 Etienne Pallier
Collecting wheel
755 81 Etienne Pallier
  Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB)
756 81 Etienne Pallier
Installing collected packages: wheel
757 81 Etienne Pallier
  Found existing installation: wheel 0.24.0
758 81 Etienne Pallier
    Uninstalling wheel-0.24.0:
759 81 Etienne Pallier
      Successfully uninstalled wheel-0.24.0
760 81 Etienne Pallier
Successfully installed wheel-0.29.0
761 81 Etienne Pallier
762 81 Etienne Pallier
</pre>
763 81 Etienne Pallier
764 81 Etienne Pallier
Go into the install/ folder:
765 81 Etienne Pallier
<pre>
766 81 Etienne Pallier
$ cd .../PYROS/install/
767 81 Etienne Pallier
</pre>
768 81 Etienne Pallier
769 84 Etienne Pallier
Install all the needed python packages at once:
770 85 Etienne Pallier
<pre>
771 1 Etienne Pallier
$ pip install -r REQUIREMENTS.txt
772 85 Etienne Pallier
</pre>
773 84 Etienne Pallier
774 84 Etienne Pallier
If something goes wrong, install them one by one:
775 62 Etienne Pallier
776 62 Etienne Pallier
  * *Install Django* :
777 62 Etienne Pallier
<pre>
778 62 Etienne Pallier
$ pip install django
779 62 Etienne Pallier
Collecting django
780 62 Etienne Pallier
  Downloading Django-1.9.4-py2.py3-none-any.whl (6.6MB)
781 62 Etienne Pallier
Installing collected packages: django
782 62 Etienne Pallier
Successfully installed django-1.9.4
783 62 Etienne Pallier
784 62 Etienne Pallier
$ pip install django-admin-tools
785 62 Etienne Pallier
Collecting django-admin-tools
786 62 Etienne Pallier
  Downloading django_admin_tools-0.7.2-py2.py3-none-any.whl (289kB)
787 62 Etienne Pallier
Installing collected packages: django-admin-tools
788 62 Etienne Pallier
Successfully installed django-admin-tools-0.7.2
789 62 Etienne Pallier
790 62 Etienne Pallier
$ pip install django-debug-toolbar
791 62 Etienne Pallier
Collecting django-debug-toolbar
792 62 Etienne Pallier
  Downloading django_debug_toolbar-1.4-py2.py3-none-any.whl (212kB)
793 62 Etienne Pallier
Requirement already satisfied (use --upgrade to upgrade): Django>=1.7 in ./venv_py35_pyros/lib/python3.5/site-packages (from django-debug-toolbar)
794 62 Etienne Pallier
Collecting sqlparse (from django-debug-toolbar)
795 62 Etienne Pallier
  Downloading sqlparse-0.1.19.tar.gz (58kB)
796 62 Etienne Pallier
Building wheels for collected packages: sqlparse
797 62 Etienne Pallier
  Running setup.py bdist_wheel for sqlparse ... done
798 62 Etienne Pallier
  Stored in directory: /Users/epallier/Library/Caches/pip/wheels/7b/d4/72/6011bb100dd5fc213164e4bbee13d4e03261dd54ce6a5de6b8
799 62 Etienne Pallier
Successfully built sqlparse
800 62 Etienne Pallier
Installing collected packages: sqlparse, django-debug-toolbar
801 62 Etienne Pallier
Successfully installed django-debug-toolbar-1.4 sqlparse-0.1.19
802 62 Etienne Pallier
803 62 Etienne Pallier
$ pip install django-extensions
804 62 Etienne Pallier
Collecting django-extensions
805 62 Etienne Pallier
  Downloading django_extensions-1.6.1-py2.py3-none-any.whl (202kB)
806 62 Etienne Pallier
Collecting six>=1.2 (from django-extensions)
807 62 Etienne Pallier
  Downloading six-1.10.0-py2.py3-none-any.whl
808 62 Etienne Pallier
Installing collected packages: six, django-extensions
809 62 Etienne Pallier
Successfully installed django-extensions-1.6.1 six-1.10.0
810 62 Etienne Pallier
811 62 Etienne Pallier
$ pip install django-suit
812 62 Etienne Pallier
Collecting django-suit
813 62 Etienne Pallier
  Downloading django-suit-0.2.18.tar.gz (587kB)
814 62 Etienne Pallier
Building wheels for collected packages: django-suit
815 62 Etienne Pallier
  Running setup.py bdist_wheel for django-suit ... done
816 62 Etienne Pallier
  Stored in directory: /Users/epallier/Library/Caches/pip/wheels/12/8b/9a/e02ab0ad9229881638aa040d47d77c8f562999533811927d41
817 62 Etienne Pallier
Successfully built django-suit
818 62 Etienne Pallier
Installing collected packages: django-suit
819 62 Etienne Pallier
Successfully installed django-suit-0.2.18
820 62 Etienne Pallier
821 62 Etienne Pallier
</pre>
822 62 Etienne Pallier
823 62 Etienne Pallier
  * *Install the django boostrap css package* :
824 62 Etienne Pallier
<pre>
825 62 Etienne Pallier
$ pip install django-bootstrap3
826 62 Etienne Pallier
</pre>
827 62 Etienne Pallier
(==> 'bootstrap3' is then to be added as an application in settings.py -> INSTALLED_APPS)
828 62 Etienne Pallier
829 62 Etienne Pallier
  * *Install the web application server gunicorn (will be used in production instead of the dev django web server)* :
830 62 Etienne Pallier
<pre>
831 62 Etienne Pallier
$ pip install gunicorn
832 62 Etienne Pallier
Collecting gunicorn
833 62 Etienne Pallier
  Downloading gunicorn-19.4.5-py2.py3-none-any.whl (112kB)
834 62 Etienne Pallier
Installing collected packages: gunicorn
835 62 Etienne Pallier
Successfully installed gunicorn-19.4.5
836 62 Etienne Pallier
</pre>
837 62 Etienne Pallier
838 62 Etienne Pallier
  * *Install the python mysql client* (not needed if you want to use sqlite):
839 62 Etienne Pallier
<pre>
840 62 Etienne Pallier
$ pip install mysqlclient
841 62 Etienne Pallier
...
842 62 Etienne Pallier
</pre>
843 62 Etienne Pallier
844 146 Etienne Pallier
   * => If issue under Mac OS X:
845 62 Etienne Pallier
<pre>
846 62 Etienne Pallier
$ pip install mysqlclient
847 62 Etienne Pallier
Collecting mysqlclient
848 62 Etienne Pallier
  Downloading mysqlclient-1.3.7.tar.gz (79kB)
849 62 Etienne Pallier
Building wheels for collected packages: mysqlclient
850 62 Etienne Pallier
  Running setup.py bdist_wheel for mysqlclient ... error
851 62 Etienne Pallier
852 62 Etienne Pallier
  ----------------------------------------
853 62 Etienne Pallier
  Failed building wheel for mysqlclient
854 62 Etienne Pallier
  Running setup.py clean for mysqlclient
855 62 Etienne Pallier
Failed to build mysqlclient
856 62 Etienne Pallier
Installing collected packages: mysqlclient
857 62 Etienne Pallier
  Running setup.py install for mysqlclient ... done
858 62 Etienne Pallier
Successfully installed mysqlclient-1.3.7
859 62 Etienne Pallier
860 62 Etienne Pallier
BOUH !!!
861 1 Etienne Pallier
862 152 Etienne Pallier
=> Need to upgrade wheel:
863 146 Etienne Pallier
864 62 Etienne Pallier
$ pip install --upgrade wheel
865 62 Etienne Pallier
Collecting wheel
866 62 Etienne Pallier
  Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB)
867 62 Etienne Pallier
Installing collected packages: wheel
868 62 Etienne Pallier
  Found existing installation: wheel 0.24.0
869 62 Etienne Pallier
    Uninstalling wheel-0.24.0:
870 62 Etienne Pallier
      Successfully uninstalled wheel-0.24.0
871 62 Etienne Pallier
Successfully installed wheel-0.29.0
872 62 Etienne Pallier
873 153 Etienne Pallier
YES !!!
874 1 Etienne Pallier
875 154 Etienne Pallier
Only if necessary, you can reinstall mysqlclient:
876 153 Etienne Pallier
$ pip uninstall mysqlclient
877 62 Etienne Pallier
$ pip install mysqlclient
878 62 Etienne Pallier
Collecting mysqlclient
879 62 Etienne Pallier
  Using cached mysqlclient-1.3.7.tar.gz
880 62 Etienne Pallier
Building wheels for collected packages: mysqlclient
881 62 Etienne Pallier
  Running setup.py bdist_wheel for mysqlclient ... done
882 62 Etienne Pallier
  Stored in directory: /Users/epallier/Library/Caches/pip/wheels/9b/06/50/d11418c26cf8f2156b13d4363b5afde8e7e75ebb8540d0228d
883 62 Etienne Pallier
Successfully built mysqlclient
884 62 Etienne Pallier
Installing collected packages: mysqlclient
885 62 Etienne Pallier
Successfully installed mysqlclient-1.3.7
886 62 Etienne Pallier
887 1 Etienne Pallier
</pre>
888 62 Etienne Pallier
889 146 Etienne Pallier
   * => If issue under Windows
890 62 Etienne Pallier
<pre>
891 62 Etienne Pallier
Same message as the issue for Mac.
892 146 Etienne Pallier
893 204 Paul Carensac
=> Need to install wheel manually :
894 62 Etienne Pallier
895 62 Etienne Pallier
Go to http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient to download the newest mysqlclient wheel
896 62 Etienne Pallier
897 62 Etienne Pallier
$ pip install path\to\mysqlclient\wheel
898 62 Etienne Pallier
899 154 Etienne Pallier
(No need to redo "pip install mysqlclient")
900 62 Etienne Pallier
</pre>
901 163 Paul Carensac
902 163 Paul Carensac
  * *Install the julian day converter* :
903 163 Paul Carensac
<pre>
904 163 Paul Carensac
$ pip install jdcal
905 163 Paul Carensac
</pre>
906 182 Paul Carensac
907 188 Paul Carensac
  * *Install Celery and dependencies* :
908 182 Paul Carensac
<pre>
909 182 Paul Carensac
$ pip install celery
910 1 Etienne Pallier
$ pip install django-celery
911 188 Paul Carensac
$ pip install Twisted==16.0.0
912 188 Paul Carensac
</pre>
913 188 Paul Carensac
914 188 Paul Carensac
  * *Install django test without migrations (compulsory to use the prod DB for tests)* :
915 188 Paul Carensac
<pre>
916 188 Paul Carensac
$ pip install django-test-without-migrations==0.4
917 188 Paul Carensac
</pre>
918 188 Paul Carensac
919 188 Paul Carensac
  * *Install voevent parser* :
920 188 Paul Carensac
<pre>
921 188 Paul Carensac
$ pip install voevent-parse==0.9.5
922 188 Paul Carensac
</pre>
923 188 Paul Carensac
924 188 Paul Carensac
925 188 Paul Carensac
  * *Install other dependencies (useful ? TBC)* :
926 188 Paul Carensac
<pre>
927 188 Paul Carensac
$ pip install amqplib==1.0.2
928 188 Paul Carensac
$ pip install pluggy==0.3.1
929 188 Paul Carensac
$ pip install py==1.4.31
930 182 Paul Carensac
</pre>