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