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