... | ... | @@ -27,9 +27,9 @@ sudo apt install git |
|
|
|
|
|
### Éventuellement Python
|
|
|
|
|
|
#### Ubuntu 20.04
|
|
|
#### Ubuntu (>20.04)
|
|
|
|
|
|
Python3.7 n'est plus dans les dépôts par défaut. Ajoutez le dépôt suivant :
|
|
|
Python3.11 n'est plus dans les dépôts par défaut. Ajoutez le dépôt suivant :
|
|
|
|
|
|
```
|
|
|
sudo apt update
|
... | ... | @@ -39,7 +39,7 @@ sudo add-apt-repository ppa:deadsnakes/ppa |
|
|
|
|
|
#### Toute version
|
|
|
|
|
|
`sudo apt install python3.7 python3.7-minimal python3.7-venv python3-pip python3-virtualenv virtualenv`
|
|
|
`sudo apt install python3.11 python3.11-minimal python3.11-venv python3-pip python3-virtualenv virtualenv`
|
|
|
|
|
|
## whoami
|
|
|
|
... | ... | @@ -78,7 +78,7 @@ git checkout dev |
|
|
On utilise la commande suivante :
|
|
|
|
|
|
```
|
|
|
virtualenv -p /usr/bin/python3.7 venv
|
|
|
virtualenv -p /usr/bin/python3.11 venv
|
|
|
```
|
|
|
|
|
|
On utilise ce virtualenv :
|
... | ... | @@ -91,7 +91,7 @@ On met à jour PIP : |
|
|
|
|
|
```
|
|
|
pip3 install --upgrade pip
|
|
|
Requirement already up-to-date: pip in ./venv/lib/python3.7/site-packages (20.0.2)
|
|
|
Requirement already up-to-date: pip in ./venv/lib/python3.11/site-packages (20.0.2)
|
|
|
```
|
|
|
|
|
|
On installe les modules python3 nécessaires :
|
... | ... | @@ -251,7 +251,7 @@ cd FlOpEDT/ # On se déplace dans le répertoire FlOpEDT pour cha |
|
|
source venv/bin/activate # On charge l'environnement virtuel python
|
|
|
cd # On revient à la racine de notre 'home'
|
|
|
cd gurobi902/linux64/ # On se déplace dans le répertoire ou est stocké le fichier d'installation du module python
|
|
|
python3.7 setup.py install # On lance l'installation
|
|
|
python3.11 setup.py install # On lance l'installation
|
|
|
```
|
|
|
|
|
|
Vous devriez obtenir ceci :
|
... | ... | @@ -263,23 +263,23 @@ Vous devriez obtenir ceci : |
|
|
creating build
|
|
|
creating build/lib
|
|
|
creating build/lib/gurobipy
|
|
|
copying lib/python3.7_utf32/gurobipy/__init__.py -> build/lib/gurobipy
|
|
|
copying lib/python3.7_utf32/gurobipy/gurobipy.so -> build/lib/gurobipy
|
|
|
copying lib/python3.11_utf32/gurobipy/__init__.py -> build/lib/gurobipy
|
|
|
copying lib/python3.11_utf32/gurobipy/gurobipy.so -> build/lib/gurobipy
|
|
|
running install_lib
|
|
|
creating /home/fedt/FlOpEDT/venv/lib/python3.7/site-packages/gurobipy
|
|
|
copying build/lib/gurobipy/gurobipy.so -> /home/fedt/FlOpEDT/venv/lib/python3.7/site-packages/gurobipy
|
|
|
copying build/lib/gurobipy/__init__.py -> /home/fedt/FlOpEDT/venv/lib/python3.7/site-packages/gurobipy
|
|
|
byte-compiling /home/fedt/FlOpEDT/venv/lib/python3.7/site-packages/gurobipy/__init__.py to __init__.cpython-37.pyc
|
|
|
creating /home/fedt/FlOpEDT/venv/lib/python3.11/site-packages/gurobipy
|
|
|
copying build/lib/gurobipy/gurobipy.so -> /home/fedt/FlOpEDT/venv/lib/python3.11/site-packages/gurobipy
|
|
|
copying build/lib/gurobipy/__init__.py -> /home/fedt/FlOpEDT/venv/lib/python3.11/site-packages/gurobipy
|
|
|
byte-compiling /home/fedt/FlOpEDT/venv/lib/python3.11/site-packages/gurobipy/__init__.py to __init__.cpython-311.pyc
|
|
|
running install_egg_info
|
|
|
Writing /home/fedt/FlOpEDT/venv/lib/python3.7/site-packages/gurobipy-9.0.2.egg-info
|
|
|
Writing /home/fedt/FlOpEDT/venv/lib/python3.11/site-packages/gurobipy-9.0.2.egg-info
|
|
|
removing /home/fedt/gurobi902/linux64/build
|
|
|
```
|
|
|
|
|
|
Si tout est bon, en lançant python, vous devriez pouvoir importer le module sans erreur :
|
|
|
|
|
|
```
|
|
|
python3.7
|
|
|
Python 3.7.3 (default, Dec 20 2019, 18:57:59)
|
|
|
python3.11
|
|
|
Python 3.11.1 (default, Dec 20 2019, 18:57:59)
|
|
|
[GCC 8.3.0] on linux
|
|
|
Type "help", "copyright", "credits" or "license" for more information.
|
|
|
>>> import gurobipy
|
... | ... | @@ -295,13 +295,13 @@ On retourne dans l'environnement virtuel : |
|
|
cd FlOpEDT/ # On se déplace dans le bon répertoire
|
|
|
source venv/bin/activate # On active notre environnement virtuel
|
|
|
cd FlOpEDT/ # On se déplace à nouveau dans le bon répertoire ( ~/FlOpEDT/FlOpEDT$ )
|
|
|
python3.7 manage.py migrate # On lance les migrations
|
|
|
FLOP_CONFIG_FILE=../config_file/flopedt.ini python3.11 manage.py migrate # On lance les migrations
|
|
|
```
|
|
|
|
|
|
Ceci nous donne quelque chose de ressemblant à :
|
|
|
|
|
|
```
|
|
|
(venv) fedt@yaddle:~/FlOpEDT/FlOpEDT$ python3.7 manage.py migrate
|
|
|
(venv) fedt@yaddle:~/FlOpEDT/FlOpEDT$ FLOP_CONFIG_FILE=../config_file/flopedt.ini python3.11 manage.py migrate
|
|
|
Operations to perform:
|
|
|
Apply all migrations: TTapp, admin, auth, base, configuration, contenttypes, displayweb, easter_egg, people, quote, sessions, solve_board
|
|
|
Running migrations:
|
... | ... | @@ -427,7 +427,7 @@ RoomPreferences: OK |
|
|
Pour tester l'outil, on peut importer les données fournies qui servent de jeu de test :
|
|
|
|
|
|
```
|
|
|
python3.7 manage.py loaddata ../dump.json
|
|
|
FLOP_CONFIG_FILE=../config_file/flopedt.ini python3.11 manage.py loaddata ../dump.json
|
|
|
```
|
|
|
|
|
|
Ce qui nous donne :
|
... | ... | @@ -447,7 +447,7 @@ Ce qui nous donne : |
|
|
On peut créer un superutilisateur (qui aura accès à toutes les fonctionnalités de l'application):
|
|
|
|
|
|
```
|
|
|
python3.7 manage.py createsuperuser
|
|
|
FLOP_CONFIG_FILE=../config_file/flopedt.ini python3.11 manage.py createsuperuser
|
|
|
```
|
|
|
|
|
|
puis se laisser guider...
|
... | ... | @@ -457,7 +457,7 @@ puis se laisser guider... |
|
|
Pour lancer le serveur manuellement, on utilise :
|
|
|
|
|
|
```
|
|
|
python3.7 manage.py runserver
|
|
|
FLOP_CONFIG_FILE=../config_file/flopedt.ini python3.11 manage.py runserver
|
|
|
```
|
|
|
|
|
|
Vous pouvez désormais normalement accéder au site en tapant dans un navigateur :
|
... | ... | |