Error installing Supervisor in Raspbian

2

I have a Raspberry Pi 3 Model B

In which I have installed Raspbian via NOOBS in its current version that the date is 2.4.4

I'm following a tutorial on how to configure Django + Ngnix + Gunicorn in the following Link , the drawback is that in one of the steps it asks me to install supervisor but when running in console the command to install:

$ sudo apt-get install supervisor

The terminal is returning the following error:

Leyendo la información de estado... Hecho
Se instalarán los siguientes paquetes adicionales:
  python-meld3
Paquetes sugeridos:
  supervisor-doc
Se instalarán los siguientes paquetes NUEVOS:
  python-meld3 supervisor
0 actualizados, 2 nuevos se instalarán, 0 para eliminar y 70 no actualizados.
Se necesita descargar 317 kB de archivos.
Se utilizarán 1.604 kB de espacio de disco adicional después de esta operación.
¿Desea continuar? [S/n] s
Des:1 http://raspbian.c3sl.ufpr.br/raspbian stretch/main armhf python-meld3 all 1.0.2-2 [37,3 kB]
Des:2 http://raspbian.c3sl.ufpr.br/raspbian stretch/main armhf supervisor all 3.3.1-1+deb9u1 [280 kB]
Descargados 317 kB en 4s (66,9 kB/s)
Seleccionando el paquete python-meld3 previamente no seleccionado.
(Leyendo la base de datos ... 126839 ficheros o directorios instalados actualmente.)
Preparando para desempaquetar .../python-meld3_1.0.2-2_all.deb ...
Desempaquetando python-meld3 (1.0.2-2) ...
Seleccionando el paquete supervisor previamente no seleccionado.
Preparando para desempaquetar .../supervisor_3.3.1-1+deb9u1_all.deb ...
Desempaquetando supervisor (3.3.1-1+deb9u1) ...
Configurando python-meld3 (1.0.2-2) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error al procesar el paquete python-meld3 (--configure):
 el subproceso instalado el script post-installation devolvió el código de salida de error 1
dpkg: problemas de dependencias impiden la configuración de supervisor:
 supervisor depende de python-meld3; sin embargo:
 El paquete 'python-meld3' no está configurado todavía.

dpkg: error al procesar el paquete supervisor (--configure):
 problemas de dependencias - se deja sin configurar
Procesando disparadores para systemd (232-25+deb9u1) ...
Procesando disparadores para man-db (2.7.6.1-2) ...
Se encontraron errores al procesar:
 python-meld3
 supervisor
E: Sub-process /usr/bin/dpkg returned an error code (1)

Someone had the same problem, as I solve it, thank you very much.

Update

I forgot to clarify, set Python3.5 as the default version, and apparently the ConfigParse module in Python3 was renamed to configparse so it seems that that's the reason for the problem, I'll try to default to Python2.7 again and tell you.

    
asked by Ricardo D. Quiroga 17.10.2017 в 03:08
source

1 answer

2

Indeed the problem was that supervisor is not compiled for python3 but for python2

We check the default python version

$ python --version
Python 3.5.10

so to go back to python2 I had to do

$ update-alternatives --config python

Existen 2 opciones para la alternativa python (que provee /usr/bin/python).

Selección   Ruta                Prioridad  Estado
------------------------------------------------------------
* 0            /usr/bin/python3.5   1         modo automático
  1            /usr/bin/python2.7   0         modo manual
  2            /usr/bin/python3.5   1         modo manual
Pulse <Intro> para mantener el valor por omisión [*] o pulse un número de selección: 1

then check the version and actually change to Python2

$ python --version
Python 2.7.13

Now run the command to install supervisor and it will no longer cause problems

$ sudo apt-get install supervisor
    
answered by 17.10.2017 / 05:03
source