Wiki
Version 270 (Etienne Pallier, 03/23/2016 08:38 am)
1 | 1 | Etienne Pallier | h1. Technical Documentation for the PYROS project (FGFT-CC) |
---|---|---|---|
2 | 1 | Etienne Pallier | |
3 | 1 | Etienne Pallier | |
4 | 1 | Etienne Pallier | HOWTO Format Redmine Wiki : http://www.redmine.org/projects/redmine/wiki/FrRedmineWikiFormatting |
5 | 1 | Etienne Pallier | |
6 | 1 | Etienne Pallier | {{>toc}} |
7 | 1 | Etienne Pallier | |
8 | 1 | Etienne Pallier | |
9 | 121 | Etienne Pallier | --- |
10 | 1 | Etienne Pallier | |
11 | 121 | Etienne Pallier | h2. %{margin-left:0px; font-weight:bold; font-size:25px; display:block; color:red;}I - TODO% |
12 | 121 | Etienne Pallier | |
13 | 251 | Etienne Pallier | * Intégration dans Eclipse |
14 | 125 | Etienne Pallier | |
15 | 251 | Etienne Pallier | * Séparation des BD Django et Pyros |
16 | 126 | Etienne Pallier | |
17 | 174 | Etienne Pallier | * Intégration des modules Django déjà développés |
18 | 125 | Etienne Pallier | |
19 | 121 | Etienne Pallier | |
20 | 3 | Etienne Pallier | --- |
21 | 1 | Etienne Pallier | |
22 | 140 | Etienne Pallier | h2. %{margin-left:0px; font-weight:bold; font-size:25px; display:block; color:red;}I - DATABASE SCHEMA (v0.2.1)% |
23 | 116 | Etienne Pallier | |
24 | 116 | Etienne Pallier | |
25 | 117 | Etienne Pallier | {{thumbnail(PYROS_PDM_v021.png, size=300, title=Pyros data model)}} |
26 | 121 | Etienne Pallier | |
27 | 121 | Etienne Pallier | |
28 | 121 | Etienne Pallier | --- |
29 | 116 | Etienne Pallier | |
30 | 141 | Etienne Pallier | h2. %{margin-left:0px; font-weight:bold; font-size:25px; display:block; color:red;}II - Get the project (from gitlab)% |
31 | 141 | Etienne Pallier | |
32 | 253 | Etienne Pallier | h3. Project structure |
33 | 1 | Etienne Pallier | |
34 | 253 | Etienne Pallier | Once you have fetched the project, you should obtain this structure: |
35 | 1 | Etienne Pallier | |
36 | 226 | Etienne Pallier | <pre> |
37 | 1 | Etienne Pallier | |
38 | 1 | Etienne Pallier | PYROS/ |
39 | 254 | Etienne Pallier | ├── install/ |
40 | 254 | Etienne Pallier | │ └── REQUIREMENTS.txt |
41 | 254 | Etienne Pallier | │ └── INSTALLATION.txt |
42 | 226 | Etienne Pallier | ├── public/ |
43 | 226 | Etienne Pallier | │ └── static/ |
44 | 226 | Etienne Pallier | ├── src/ |
45 | 226 | Etienne Pallier | │ ├── manage.py |
46 | 226 | Etienne Pallier | │ ├── pyros/ |
47 | 226 | Etienne Pallier | │ │ ├── __init__.py |
48 | 226 | Etienne Pallier | │ │ ├── __pycache__ |
49 | 226 | Etienne Pallier | │ │ ├── settings.py |
50 | 1 | Etienne Pallier | │ │ ├── urls.py |
51 | 1 | Etienne Pallier | │ │ └── wsgi.py |
52 | 1 | Etienne Pallier | │ └── pyrosapp/ |
53 | 1 | Etienne Pallier | │ ├── __init__.py |
54 | 1 | Etienne Pallier | │ ├── admin.py |
55 | 1 | Etienne Pallier | │ ├── apps.py |
56 | 1 | Etienne Pallier | │ ├── migrations |
57 | 1 | Etienne Pallier | │ ├── models.py |
58 | 1 | Etienne Pallier | │ ├── tests.py |
59 | 1 | Etienne Pallier | │ └── views.py |
60 | 1 | Etienne Pallier | |
61 | 1 | Etienne Pallier | |
62 | 253 | Etienne Pallier | </pre> |
63 | 253 | Etienne Pallier | |
64 | 265 | Etienne Pallier | h3. From the terminal |
65 | 253 | Etienne Pallier | |
66 | 253 | Etienne Pallier | <pre> |
67 | 253 | Etienne Pallier | git clone https://gitlab.irap.omp.eu/epallier/pyros.git PYROS |
68 | 256 | Etienne Pallier | (or also : git clone git@gitlab.irap.omp.eu:epallier/pyros.git PYROS) |
69 | 253 | Etienne Pallier | </pre> |
70 | 255 | Etienne Pallier | |
71 | 253 | Etienne Pallier | This creates a PYROS/ folder containing the project (with a .git/ subfolder for synchronization with the git repository) |
72 | 253 | Etienne Pallier | |
73 | 257 | Etienne Pallier | _If you just wanted a static copy of the project (without synchronization), just remove the .git/ folder:_ |
74 | 253 | Etienne Pallier | <pre> |
75 | 253 | Etienne Pallier | $ rm -r .git/ |
76 | 253 | Etienne Pallier | </pre> |
77 | 226 | Etienne Pallier | |
78 | 264 | Etienne Pallier | h3. From Eclipse |
79 | 1 | Etienne Pallier | |
80 | 258 | Etienne Pallier | 1) Fetch the project |
81 | 258 | Etienne Pallier | |
82 | 252 | Etienne Pallier | File/Import project from git |
83 | 1 | Etienne Pallier | |
84 | 258 | Etienne Pallier | Select repository source: Clone URI: https://gitlab.irap.omp.eu/epallier/pyros.git |
85 | 252 | Etienne Pallier | |
86 | 252 | Etienne Pallier | Directory: |
87 | 252 | Etienne Pallier | par défaut, il propose : /Users/epallier/git/pyros |
88 | 258 | Etienne Pallier | mais on peut le mettre ailleurs (c'est ce que j'ai fait) |
89 | 252 | Etienne Pallier | |
90 | 252 | Etienne Pallier | initial branch: master |
91 | 1 | Etienne Pallier | remote name: origin |
92 | 1 | Etienne Pallier | |
93 | 1 | Etienne Pallier | Import as general project |
94 | 252 | Etienne Pallier | |
95 | 252 | Etienne Pallier | Project name: PYROS |
96 | 252 | Etienne Pallier | |
97 | 258 | Etienne Pallier | |
98 | 258 | Etienne Pallier | 2) Configure the project |
99 | 258 | Etienne Pallier | |
100 | 252 | Etienne Pallier | The project is created. Now, you have to set it as a «PyDev » and a « Django » project. |
101 | 252 | Etienne Pallier | |
102 | 252 | Etienne Pallier | clic droit sur le projet / PyDev / set as a PyDev project |
103 | 252 | Etienne Pallier | |
104 | 1 | Etienne Pallier | clic droit sur le projet / PyDev / set as a Django project |
105 | 1 | Etienne Pallier | |
106 | 1 | Etienne Pallier | clic droit sur le projet : on doit maintenant avoir un sous-menu Django |
107 | 252 | Etienne Pallier | |
108 | 252 | Etienne Pallier | clic droit sur le dossier src / PyDev / set as source folder (add to PYTHONPATH) |
109 | 252 | Etienne Pallier | |
110 | 252 | Etienne Pallier | clic droit sur projet / Properties / Pydev-Django : |
111 | 258 | Etienne Pallier | - Django manage.py : src/manage.py |
112 | 258 | Etienne Pallier | - Django settings module : pyros.settings |
113 | 252 | Etienne Pallier | |
114 | 258 | Etienne Pallier | |
115 | 258 | Etienne Pallier | 3) Test by running the web server : |
116 | 252 | Etienne Pallier | clic droit sur projet, Django/Custom command/runserver |
117 | 252 | Etienne Pallier | |
118 | 252 | Etienne Pallier | check http://localhost:8000/ |
119 | 252 | Etienne Pallier | |
120 | 252 | Etienne Pallier | |
121 | 259 | Etienne Pallier | 4) Set Code style |
122 | 252 | Etienne Pallier | |
123 | 252 | Etienne Pallier | Window/Preferences : Pydev / Editor |
124 | 252 | Etienne Pallier | - Auto Imports : uncheck « Do auto import » |
125 | 252 | Etienne Pallier | - Code style: |
126 | 252 | Etienne Pallier | - Locals … : camelCase |
127 | 252 | Etienne Pallier | - Methods : camelCase() with first lower |
128 | 252 | Etienne Pallier | - Code style / Code Formatter: activer « use autopep8.py for code formatting » |
129 | 1 | Etienne Pallier | - Tabs : Tab length : 4 |
130 | 264 | Etienne Pallier | |
131 | 264 | Etienne Pallier | (il faudra aussi faire un peu plus loin : https://projects.irap.omp.eu/projects/pyros/wiki/Wiki#Eclipse-only-Set-the-Python3-virtual-environment-as-the-project-interpreter) |
132 | 264 | Etienne Pallier | |
133 | 169 | Etienne Pallier | |
134 | 141 | Etienne Pallier | h2. %{margin-left:0px; font-weight:bold; font-size:25px; display:block; color:red;}III - INSTALLATION% |
135 | 2 | Etienne Pallier | |
136 | 120 | Etienne Pallier | |
137 | 120 | Etienne Pallier | --- |
138 | 120 | Etienne Pallier | |
139 | 184 | Etienne Pallier | h3. Install MySql (only if necessary) |
140 | 2 | Etienne Pallier | |
141 | 49 | Etienne Pallier | * Linux Ubuntu |
142 | 49 | Etienne Pallier | <pre> |
143 | 107 | Paul Carensac | |
144 | 107 | Paul Carensac | $ sudo apt-get install mysql-server |
145 | 107 | Paul Carensac | $ sudo apt-get install mysql-client |
146 | 107 | Paul Carensac | |
147 | 49 | Etienne Pallier | </pre> |
148 | 49 | Etienne Pallier | |
149 | 49 | Etienne Pallier | * Linux CentOS |
150 | 49 | Etienne Pallier | <pre> |
151 | 49 | Etienne Pallier | TODO: |
152 | 49 | Etienne Pallier | $ sudo yum install mysql |
153 | 49 | Etienne Pallier | ... |
154 | 49 | Etienne Pallier | </pre> |
155 | 49 | Etienne Pallier | |
156 | 49 | Etienne Pallier | * Mac OS X |
157 | 1 | Etienne Pallier | Install XAMPP |
158 | 1 | Etienne Pallier | (but you could also use the pre-installed Mac OS MySql) |
159 | 177 | Etienne Pallier | <pre> |
160 | 177 | Etienne Pallier | TODO: |
161 | 49 | Etienne Pallier | </pre> |
162 | 1 | Etienne Pallier | |
163 | 49 | Etienne Pallier | * Windows |
164 | 243 | Paul Carensac | |
165 | 1 | Etienne Pallier | <pre> |
166 | 243 | Paul Carensac | Download and install the newest version on https://dev.mysql.com/downloads/installer/ |
167 | 243 | Paul Carensac | |
168 | 243 | Paul Carensac | Once installed, launch MySQL Installer. Clic on 'Add...' on the right. |
169 | 243 | Paul Carensac | In MySQLServers section, choose the newest, then clic on next. |
170 | 243 | Paul Carensac | Install and configure the server (just follow the installation guide). |
171 | 243 | Paul Carensac | |
172 | 243 | Paul Carensac | Then launch mysql (via the Windows menu). |
173 | 49 | Etienne Pallier | </pre> |
174 | 49 | Etienne Pallier | |
175 | 49 | Etienne Pallier | |
176 | 49 | Etienne Pallier | --- |
177 | 1 | Etienne Pallier | |
178 | 185 | Etienne Pallier | h3. Install Python3.5 (only if necessary) |
179 | 1 | Etienne Pallier | |
180 | 11 | Etienne Pallier | |
181 | 11 | Etienne Pallier | * Mac OS X : |
182 | 1 | Etienne Pallier | <pre> |
183 | 183 | Etienne Pallier | |
184 | 24 | Etienne Pallier | 1) Installer MacPort |
185 | 24 | Etienne Pallier | (TODO: doc) |
186 | 24 | Etienne Pallier | |
187 | 24 | Etienne Pallier | 2) Installer le "port" python35 |
188 | 1 | Etienne Pallier | $ sudo port install python35 |
189 | 183 | Etienne Pallier | |
190 | 1 | Etienne Pallier | </pre> |
191 | 1 | Etienne Pallier | |
192 | 1 | Etienne Pallier | * Linux (Ubuntu) : |
193 | 1 | Etienne Pallier | <pre> |
194 | 244 | Paul Carensac | $ sudo add-apt-repository ppa:fkrull/deadsnakes |
195 | 244 | Paul Carensac | $ sudo apt-get update |
196 | 244 | Paul Carensac | $ sudo apt-get install python3.5 |
197 | 1 | Etienne Pallier | |
198 | 244 | Paul Carensac | $ sudo pip install virtualenv |
199 | 1 | Etienne Pallier | </pre> |
200 | 1 | Etienne Pallier | |
201 | 244 | Paul Carensac | |
202 | 244 | Paul Carensac | * Windows 7 : |
203 | 244 | Paul Carensac | <pre> |
204 | 244 | Paul Carensac | Go to https://www.python.org/downloads/windows/ , choose the wanted version |
205 | 244 | Paul Carensac | On the wanted version’s page, download Windows x86 executable installer |
206 | 244 | Paul Carensac | |
207 | 244 | Paul Carensac | Run the executable |
208 | 244 | Paul Carensac | * On the first page, check "Add python3.5 to PATH" |
209 | 244 | Paul Carensac | * Choose "Install now" option |
210 | 245 | Paul Carensac | |
211 | 245 | Paul Carensac | Open cmd (windows + R, cmd) : |
212 | 245 | Paul Carensac | $ python -m pip install --upgrade pip |
213 | 245 | Paul Carensac | $ pip install virtualenv |
214 | 244 | Paul Carensac | </pre> |
215 | 1 | Etienne Pallier | |
216 | 183 | Etienne Pallier | * Windows 10 : |
217 | 183 | Etienne Pallier | <pre> |
218 | 187 | Etienne Pallier | TODO: |
219 | 183 | Etienne Pallier | </pre> |
220 | 3 | Etienne Pallier | |
221 | 4 | Etienne Pallier | --- |
222 | 5 | Etienne Pallier | |
223 | 192 | Etienne Pallier | h3. Create a Python3 virtual environment dedicated to the project (inside the project folder) |
224 | 127 | Etienne Pallier | |
225 | 131 | Etienne Pallier | <pre> |
226 | 1 | Etienne Pallier | |
227 | 193 | Etienne Pallier | $ mkdir private/ |
228 | 193 | Etienne Pallier | |
229 | 133 | Etienne Pallier | $ cd private/ |
230 | 3 | Etienne Pallier | |
231 | 246 | Paul Carensac | $ which python3.5 ("where python" for windows) |
232 | 3 | Etienne Pallier | /opt/local/bin/python3.5 |
233 | 15 | Etienne Pallier | |
234 | 127 | Etienne Pallier | $ virtualenv-3.5 venv_py35_pyros -p /opt/local/bin/python3.5 |
235 | 3 | Etienne Pallier | => creates a venv_py35_pyros/ folder inside PYROS/private/ |
236 | 1 | Etienne Pallier | |
237 | 131 | Etienne Pallier | </pre> |
238 | 1 | Etienne Pallier | |
239 | 7 | Etienne Pallier | --- |
240 | 3 | Etienne Pallier | |
241 | 65 | Etienne Pallier | h3. Activate the python virtual environment (from inside the project) |
242 | 7 | Etienne Pallier | |
243 | 55 | Etienne Pallier | <pre> |
244 | 1 | Etienne Pallier | |
245 | 65 | Etienne Pallier | $ pwd |
246 | 134 | Etienne Pallier | .../PYROS/private |
247 | 1 | Etienne Pallier | |
248 | 247 | Paul Carensac | $ source ./venv_py35_pyros/bin/activate (venv_py35_pyros/Scripts/activate on Windows) |
249 | 247 | Paul Carensac | |
250 | 65 | Etienne Pallier | |
251 | 3 | Etienne Pallier | $ python -V |
252 | 1 | Etienne Pallier | Python 3.5.1 |
253 | 3 | Etienne Pallier | |
254 | 3 | Etienne Pallier | $ which pip |
255 | 77 | Etienne Pallier | .../PYROS/venv_py35_pyros/bin/pip |
256 | 16 | Etienne Pallier | |
257 | 194 | Etienne Pallier | Upgrade pip to last version available: |
258 | 3 | Etienne Pallier | $ pip install --upgrade pip |
259 | 3 | Etienne Pallier | Collecting pip |
260 | 3 | Etienne Pallier | Downloading pip-8.1.1-py2.py3-none-any.whl (1.2MB) |
261 | 3 | Etienne Pallier | Installing collected packages: pip |
262 | 3 | Etienne Pallier | Found existing installation: pip 7.1.2 |
263 | 3 | Etienne Pallier | Uninstalling pip-7.1.2: |
264 | 3 | Etienne Pallier | Successfully uninstalled pip-7.1.2 |
265 | 1 | Etienne Pallier | Successfully installed pip-8.1.1 |
266 | 194 | Etienne Pallier | |
267 | 194 | Etienne Pallier | Upgrade wheel to last version available: |
268 | 194 | Etienne Pallier | $ pip install --upgrade wheel |
269 | 194 | Etienne Pallier | Collecting wheel |
270 | 194 | Etienne Pallier | Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB) |
271 | 194 | Etienne Pallier | Installing collected packages: wheel |
272 | 194 | Etienne Pallier | Found existing installation: wheel 0.24.0 |
273 | 194 | Etienne Pallier | Uninstalling wheel-0.24.0: |
274 | 194 | Etienne Pallier | Successfully uninstalled wheel-0.24.0 |
275 | 194 | Etienne Pallier | Successfully installed wheel-0.29.0 |
276 | 194 | Etienne Pallier | |
277 | 55 | Etienne Pallier | |
278 | 55 | Etienne Pallier | </pre> |
279 | 18 | Etienne Pallier | |
280 | 267 | Etienne Pallier | --- |
281 | 267 | Etienne Pallier | |
282 | 212 | Etienne Pallier | h3. Install the needed Python packages (from within the virtual environment) |
283 | 18 | Etienne Pallier | |
284 | 66 | Etienne Pallier | First, be sure that the virtual environment is activated: |
285 | 66 | Etienne Pallier | <pre> |
286 | 66 | Etienne Pallier | $ python -V |
287 | 66 | Etienne Pallier | Python 3.5.1 |
288 | 66 | Etienne Pallier | </pre> |
289 | 66 | Etienne Pallier | |
290 | 62 | Etienne Pallier | * *Automatic Installation of all packages* |
291 | 62 | Etienne Pallier | <pre> |
292 | 90 | Etienne Pallier | $ pip install -r REQUIREMENTS.txt |
293 | 62 | Etienne Pallier | </pre> |
294 | 62 | Etienne Pallier | |
295 | 93 | Etienne Pallier | * *Or, manual installation of each package* |
296 | 62 | Etienne Pallier | |
297 | 62 | Etienne Pallier | * *Install Django* : |
298 | 32 | Etienne Pallier | <pre> |
299 | 3 | Etienne Pallier | $ pip install django |
300 | 3 | Etienne Pallier | Collecting django |
301 | 3 | Etienne Pallier | Downloading Django-1.9.4-py2.py3-none-any.whl (6.6MB) |
302 | 3 | Etienne Pallier | Installing collected packages: django |
303 | 3 | Etienne Pallier | Successfully installed django-1.9.4 |
304 | 3 | Etienne Pallier | |
305 | 3 | Etienne Pallier | $ pip install django-admin-tools |
306 | 3 | Etienne Pallier | Collecting django-admin-tools |
307 | 3 | Etienne Pallier | Downloading django_admin_tools-0.7.2-py2.py3-none-any.whl (289kB) |
308 | 3 | Etienne Pallier | Installing collected packages: django-admin-tools |
309 | 3 | Etienne Pallier | Successfully installed django-admin-tools-0.7.2 |
310 | 3 | Etienne Pallier | |
311 | 21 | Etienne Pallier | $ pip install django-debug-toolbar |
312 | 21 | Etienne Pallier | Collecting django-debug-toolbar |
313 | 21 | Etienne Pallier | Downloading django_debug_toolbar-1.4-py2.py3-none-any.whl (212kB) |
314 | 21 | 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) |
315 | 21 | Etienne Pallier | Collecting sqlparse (from django-debug-toolbar) |
316 | 21 | Etienne Pallier | Downloading sqlparse-0.1.19.tar.gz (58kB) |
317 | 21 | Etienne Pallier | Building wheels for collected packages: sqlparse |
318 | 21 | Etienne Pallier | Running setup.py bdist_wheel for sqlparse ... done |
319 | 21 | Etienne Pallier | Stored in directory: /Users/epallier/Library/Caches/pip/wheels/7b/d4/72/6011bb100dd5fc213164e4bbee13d4e03261dd54ce6a5de6b8 |
320 | 21 | Etienne Pallier | Successfully built sqlparse |
321 | 21 | Etienne Pallier | Installing collected packages: sqlparse, django-debug-toolbar |
322 | 21 | Etienne Pallier | Successfully installed django-debug-toolbar-1.4 sqlparse-0.1.19 |
323 | 21 | Etienne Pallier | |
324 | 21 | Etienne Pallier | $ pip install django-extensions |
325 | 21 | Etienne Pallier | Collecting django-extensions |
326 | 21 | Etienne Pallier | Downloading django_extensions-1.6.1-py2.py3-none-any.whl (202kB) |
327 | 21 | Etienne Pallier | Collecting six>=1.2 (from django-extensions) |
328 | 21 | Etienne Pallier | Downloading six-1.10.0-py2.py3-none-any.whl |
329 | 21 | Etienne Pallier | Installing collected packages: six, django-extensions |
330 | 21 | Etienne Pallier | Successfully installed django-extensions-1.6.1 six-1.10.0 |
331 | 21 | Etienne Pallier | |
332 | 21 | Etienne Pallier | $ pip install django-suit |
333 | 21 | Etienne Pallier | Collecting django-suit |
334 | 21 | Etienne Pallier | Downloading django-suit-0.2.18.tar.gz (587kB) |
335 | 21 | Etienne Pallier | Building wheels for collected packages: django-suit |
336 | 1 | Etienne Pallier | Running setup.py bdist_wheel for django-suit ... done |
337 | 1 | Etienne Pallier | Stored in directory: /Users/epallier/Library/Caches/pip/wheels/12/8b/9a/e02ab0ad9229881638aa040d47d77c8f562999533811927d41 |
338 | 1 | Etienne Pallier | Successfully built django-suit |
339 | 1 | Etienne Pallier | Installing collected packages: django-suit |
340 | 1 | Etienne Pallier | Successfully installed django-suit-0.2.18 |
341 | 21 | Etienne Pallier | |
342 | 32 | Etienne Pallier | </pre> |
343 | 32 | Etienne Pallier | |
344 | 63 | Etienne Pallier | * *Install the web application server gunicorn (will be used in production instead of the dev django web server)* : |
345 | 32 | Etienne Pallier | <pre> |
346 | 25 | Etienne Pallier | $ pip install gunicorn |
347 | 25 | Etienne Pallier | Collecting gunicorn |
348 | 25 | Etienne Pallier | Downloading gunicorn-19.4.5-py2.py3-none-any.whl (112kB) |
349 | 21 | Etienne Pallier | Installing collected packages: gunicorn |
350 | 26 | Etienne Pallier | Successfully installed gunicorn-19.4.5 |
351 | 1 | Etienne Pallier | </pre> |
352 | 1 | Etienne Pallier | |
353 | 63 | Etienne Pallier | * *Install the python mysql client*: |
354 | 32 | Etienne Pallier | <pre> |
355 | 32 | Etienne Pallier | $ pip install mysqlclient |
356 | 72 | Etienne Pallier | ... |
357 | 72 | Etienne Pallier | </pre> |
358 | 33 | Etienne Pallier | |
359 | 73 | Etienne Pallier | * => Issue under Mac OS X: |
360 | 72 | Etienne Pallier | <pre> |
361 | 3 | Etienne Pallier | $ pip install mysqlclient |
362 | 3 | Etienne Pallier | Collecting mysqlclient |
363 | 1 | Etienne Pallier | Downloading mysqlclient-1.3.7.tar.gz (79kB) |
364 | 22 | Etienne Pallier | Building wheels for collected packages: mysqlclient |
365 | 3 | Etienne Pallier | Running setup.py bdist_wheel for mysqlclient ... error |
366 | 3 | Etienne Pallier | … |
367 | 1 | Etienne Pallier | ---------------------------------------- |
368 | 1 | Etienne Pallier | Failed building wheel for mysqlclient |
369 | 1 | Etienne Pallier | Running setup.py clean for mysqlclient |
370 | 1 | Etienne Pallier | Failed to build mysqlclient |
371 | 1 | Etienne Pallier | Installing collected packages: mysqlclient |
372 | 1 | Etienne Pallier | Running setup.py install for mysqlclient ... done |
373 | 1 | Etienne Pallier | Successfully installed mysqlclient-1.3.7 |
374 | 1 | Etienne Pallier | |
375 | 1 | Etienne Pallier | BOUH !!! |
376 | 1 | Etienne Pallier | |
377 | 1 | Etienne Pallier | $ pip install --upgrade wheel |
378 | 1 | Etienne Pallier | Collecting wheel |
379 | 1 | Etienne Pallier | Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB) |
380 | 1 | Etienne Pallier | Installing collected packages: wheel |
381 | 1 | Etienne Pallier | Found existing installation: wheel 0.24.0 |
382 | 1 | Etienne Pallier | Uninstalling wheel-0.24.0: |
383 | 1 | Etienne Pallier | Successfully uninstalled wheel-0.24.0 |
384 | 1 | Etienne Pallier | Successfully installed wheel-0.29.0 |
385 | 1 | Etienne Pallier | |
386 | 1 | Etienne Pallier | $ pip uninstall mysqlclient |
387 | 1 | Etienne Pallier | |
388 | 1 | Etienne Pallier | $ pip install mysqlclient |
389 | 1 | Etienne Pallier | Collecting mysqlclient |
390 | 1 | Etienne Pallier | Using cached mysqlclient-1.3.7.tar.gz |
391 | 1 | Etienne Pallier | Building wheels for collected packages: mysqlclient |
392 | 1 | Etienne Pallier | Running setup.py bdist_wheel for mysqlclient ... done |
393 | 1 | Etienne Pallier | Stored in directory: /Users/epallier/Library/Caches/pip/wheels/9b/06/50/d11418c26cf8f2156b13d4363b5afde8e7e75ebb8540d0228d |
394 | 1 | Etienne Pallier | Successfully built mysqlclient |
395 | 1 | Etienne Pallier | Installing collected packages: mysqlclient |
396 | 1 | Etienne Pallier | Successfully installed mysqlclient-1.3.7 |
397 | 1 | Etienne Pallier | |
398 | 1 | Etienne Pallier | YES !!! |
399 | 1 | Etienne Pallier | |
400 | 1 | Etienne Pallier | </pre> |
401 | 1 | Etienne Pallier | |
402 | 107 | Paul Carensac | * => Issues under Ubuntu: |
403 | 107 | Paul Carensac | <pre> |
404 | 107 | Paul Carensac | $ pip install mysqlclient |
405 | 107 | Paul Carensac | Collecting mysqlclient |
406 | 107 | Paul Carensac | Downloading mysqlclient-1.3.7.tar.gz (79kB) |
407 | 107 | Paul Carensac | 100% |████████████████████████████████| 81kB 1.5MB/s |
408 | 107 | Paul Carensac | Complete output from command python setup.py egg_info: |
409 | 107 | Paul Carensac | /bin/sh: 1: mysql_config: not found |
410 | 107 | Paul Carensac | Traceback (most recent call last): |
411 | 107 | Paul Carensac | File "<string>", line 1, in <module> |
412 | 107 | Paul Carensac | [...] |
413 | 107 | Paul Carensac | ---------------------------------------- |
414 | 107 | Paul Carensac | Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-q6j4inuz/mysqlclient/ |
415 | 1 | Etienne Pallier | |
416 | 108 | Paul Carensac | BOUH !!! |
417 | 108 | Paul Carensac | |
418 | 107 | Paul Carensac | $ sudo apt-get install libmysqlclient-dev |
419 | 108 | Paul Carensac | |
420 | 107 | Paul Carensac | $ pip install mysqlclient |
421 | 107 | Paul Carensac | Collecting mysqlclient |
422 | 107 | Paul Carensac | Using cached mysqlclient-1.3.7.tar.gz |
423 | 107 | Paul Carensac | Building wheels for collected packages: mysqlclient |
424 | 107 | Paul Carensac | Running setup.py bdist_wheel for mysqlclient ... error |
425 | 107 | Paul Carensac | … |
426 | 107 | Paul Carensac | _mysql.c:40:20: fatal error: Python.h: No such file or directory |
427 | 107 | Paul Carensac | #include "Python.h" |
428 | 107 | Paul Carensac | ^ |
429 | 107 | Paul Carensac | compilation terminated. |
430 | 107 | Paul Carensac | error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 |
431 | 107 | Paul Carensac | |
432 | 107 | Paul Carensac | ---------------------------------------- |
433 | 107 | Paul Carensac | Command "/home/carens_p/pyros/venv_py35_pyros/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-k3klv92j/mysqlclient/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-gz242xxs-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/carens_p/pyros/venv_py35_pyros/include/site/python3.5/mysqlclient" failed with error code 1 in /tmp/pip-build-k3klv92j/mysqlclient/ |
434 | 107 | Paul Carensac | |
435 | 108 | Paul Carensac | BOUH !!! |
436 | 108 | Paul Carensac | |
437 | 107 | Paul Carensac | $ sudo apt-get install python3.5-dev |
438 | 108 | Paul Carensac | |
439 | 107 | Paul Carensac | $ pip install mysqlclient |
440 | 107 | Paul Carensac | |
441 | 107 | Paul Carensac | YES !!! |
442 | 107 | Paul Carensac | |
443 | 107 | Paul Carensac | </pre> |
444 | 12 | Etienne Pallier | |
445 | 250 | Paul Carensac | * => Issue under Windows |
446 | 250 | Paul Carensac | <pre> |
447 | 250 | Paul Carensac | Same message as the issue for Mac. |
448 | 250 | Paul Carensac | |
449 | 250 | Paul Carensac | Go to http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient to download the newest mysqlclient wheel |
450 | 250 | Paul Carensac | |
451 | 250 | Paul Carensac | $ pip install path\to\mysqlclient\wheel |
452 | 250 | Paul Carensac | |
453 | 250 | Paul Carensac | No need to redo "pip install mysqlclient" |
454 | 250 | Paul Carensac | </pre> |
455 | 250 | Paul Carensac | |
456 | 12 | Etienne Pallier | --- |
457 | 28 | Etienne Pallier | |
458 | 262 | Etienne Pallier | h3. (Eclipse only) Set the Python3 virtual environment as the project interpreter |
459 | 260 | Etienne Pallier | |
460 | 260 | Etienne Pallier | clic droit sur projet / Properties / PyDev - Interpreter/Grammar : |
461 | 260 | Etienne Pallier | Grammar version : 3 |
462 | 260 | Etienne Pallier | Interpreter : click on « click here to configure an interpreter not listed » |
463 | 260 | Etienne Pallier | click on « New » : |
464 | 260 | Etienne Pallier | - Interpreter name : venv_py35_pyros |
465 | 260 | Etienne Pallier | - Interpreter executable : click on « Browse » |
466 | 260 | Etienne Pallier | Select your private/venv_py35_pyros/bin/python3.5 executable |
467 | 260 | Etienne Pallier | click OK |
468 | 260 | Etienne Pallier | click OK again |
469 | 260 | Etienne Pallier | |
470 | 260 | Etienne Pallier | Interpreter: select now venv_py35_pyros from the list |
471 | 260 | Etienne Pallier | |
472 | 266 | Etienne Pallier | --- |
473 | 266 | Etienne Pallier | |
474 | 270 | Etienne Pallier | h3. Run the project |
475 | 142 | Etienne Pallier | |
476 | 270 | Etienne Pallier | TODO: more details... (notamment sur localhost:8000/admin) |
477 | 1 | Etienne Pallier | |
478 | 270 | Etienne Pallier | |
479 | 270 | Etienne Pallier | |
480 | 270 | Etienne Pallier | |
481 | 270 | Etienne Pallier | h4. From the terminal |
482 | 270 | Etienne Pallier | |
483 | 142 | Etienne Pallier | <pre> |
484 | 142 | Etienne Pallier | |
485 | 150 | Etienne Pallier | $ cd src/ |
486 | 150 | Etienne Pallier | |
487 | 1 | Etienne Pallier | $ ./manage.py runserver |
488 | 38 | Etienne Pallier | (or gunicorn pyros.wsgi) |
489 | 3 | Etienne Pallier | ==> http://localhost:8000 |
490 | 87 | Etienne Pallier | ... |
491 | 87 | Etienne Pallier | ... |
492 | 87 | Etienne Pallier | Ctrl-c |
493 | 87 | Etienne Pallier | |
494 | 1 | Etienne Pallier | </pre> |
495 | 1 | Etienne Pallier | |
496 | 270 | Etienne Pallier | |
497 | 270 | Etienne Pallier | |
498 | 270 | Etienne Pallier | h4. From Eclipse |
499 | 270 | Etienne Pallier | |
500 | 270 | Etienne Pallier | clic droit sur projet, Django/Custom command/runserver |
501 | 270 | Etienne Pallier | |
502 | 270 | Etienne Pallier | check http://localhost:8000/ |
503 | 142 | Etienne Pallier | |
504 | 142 | Etienne Pallier | |
505 | 142 | Etienne Pallier | --- |
506 | 142 | Etienne Pallier | |
507 | 156 | Paul Carensac | h2. %{margin-left:0px; font-weight:bold; font-size:25px; display:block; color:red;}IV - CONFIGURATION of the Django Back Office (administration interface)% |
508 | 155 | Paul Carensac | |
509 | 268 | Etienne Pallier | [[django_backoffice_config|Configuration of the Django Back office (admin)]] |
510 | 268 | Etienne Pallier | |
511 | 211 | Paul Carensac | |
512 | 229 | Etienne Pallier | h2. %{margin-left:0px; font-weight:bold; font-size:25px; display:block; color:red;}V - INSTALLATION FROM THE BEGINNING (for dev only, history of the initial project creation)% |
513 | 1 | Etienne Pallier | |
514 | 236 | Etienne Pallier | |
515 | 242 | Etienne Pallier | [[pyros_install_from_start|Pyros installation from the beginning]] |