geobretagne / mreport

Simple report generator with simple dataviz
GNU General Public License v3.0
10 stars 11 forks source link

Retour d'install Debian 10 #131

Open Gaetanbrl opened 3 years ago

Gaetanbrl commented 3 years ago

Voici les retours au fil de l'eau pour l'installation sur Debian 10 Buster :

Le paquet python3.7 venv retourne une 404 avec cette distribution et ne peut être installé sur ma machine : package 404

Je dois donc installer à la place virtualenv avec python 3:

sudo apt install python3 virtualenv python3-virtualenv

e.g ce tuto.

$ python --version
Python 2.7

$ update-alternatives --list python
update-alternatives: error: no alternatives for python

$ ls /usr/bin/python*

$ update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
update-alternatives: using /usr/bin/python2.7 to provide /usr/bin/python (python) in auto mode

$ update-alternatives --install /usr/bin/python python /usr/bin/python3.7 2
update-alternatives: using /usr/bin/python3.7 to provide /usr/bin/python (python) in auto mode

$ python --version
Python 3.7

Pour changer de version de Python, il faut lancer cette commande (en tant qu'utilisateur mreport):

$ virtualenv -p /usr/bin/python3 venv
Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/mreport/venv/bin/python3
Not overwriting existing python script /home/mreport/venv/bin/python (you must use /home/mreport/venv/bin/python3)
Installing setuptools, pkg_resources, pip, wheel...done.

Ensuite ca fonctionne bien pour les liens qui sont affichés lors du démarrage Flask (/admin, /mreport, /api ...).

Il n'y a plus qu'à tester / prendre en main :ok_hand: !

spelhate commented 3 years ago

Merci pour les retours.