Open-Capture Forums Open-Capture : installation Erreur lors de l’installation

7 sujets de 1 à 7 (sur un total de 7)
  • Auteur
    Messages
  • #1340
    Thib
    Participant

    Bonjour,

     

    Je bloque lors de l’installation au niveau de odfpy :
    Collecting odfpy
    Downloading odfpy-1.4.1.tar.gz (717 kB)
    |████████████████████████████████| 717 kB 61.9 MB/s
    ERROR: Command errored out with exit status 1:
    command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ebbzqyjv/odfpy_3586bcad89f64297a8ca218c906ddecf/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ebbzqyjv/odfpy_3586bcad89f64297a8ca218c906ddecf/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-c8cv40fd
    cwd: /tmp/pip-install-ebbzqyjv/odfpy_3586bcad89f64297a8ca218c906ddecf/
    Complete output (3 lines):
    Traceback (most recent call last):
    File "<string>", line 1, in <module>
    ModuleNotFoundError: No module named 'setuptools'
    ----------------------------------------

    Et donc l’installation ne se termine pas. Pouvez vous m’éclairer sur ce blocage.

    Merci d’avance,

     

     

    Cdt

    #1341
    BRICH Oussama
    Modérateur

    Bonjour,

    Vous pouvez installer le paquet manquant (setuptools) en lançant la commande :

    pip3 install setuptools

    Cdt,
    OBR.

    #1342
    Thib
    Participant

    J’avais omis de mentionné que j’avais essayé d’installer setuptools.
    Mais il est déjà présent :
    Requirement already satisfied: setuptools in ~/.local/lib/python3.7/site-packages (58.0.4)

    #1343
    Thib
    Participant

    Autant pour moi il n’était pas installé en root 🙂

    Merci 😉

    #1344
    Thib
    Participant

    Je récupère désormais un erreur psycopg2 :

    Installing collected packages: psycopg2
    Running setup.py install for psycopg2 ... error
    ERROR: Command errored out with exit status 1:
    command: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5xcihcyy/psycopg2_b232b8f59c2740a586040461cb5807e2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5xcihcyy/psycopg2_b232b8f59c2740a586040461cb5807e2/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-f_rd8gjt/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.7/psycopg2
    cwd: /tmp/pip-install-5xcihcyy/psycopg2_b232b8f59c2740a586040461cb5807e2/
    Complete output (38 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.7
    creating build/lib.linux-x86_64-3.7/psycopg2
    copying lib/extras.py -> build/lib.linux-x86_64-3.7/psycopg2
    copying lib/errorcodes.py -> build/lib.linux-x86_64-3.7/psycopg2
    copying lib/_ipaddress.py -> build/lib.linux-x86_64-3.7/psycopg2
    copying lib/_range.py -> build/lib.linux-x86_64-3.7/psycopg2
    copying lib/errors.py -> build/lib.linux-x86_64-3.7/psycopg2
    copying lib/extensions.py -> build/lib.linux-x86_64-3.7/psycopg2
    copying lib/_json.py -> build/lib.linux-x86_64-3.7/psycopg2
    copying lib/tz.py -> build/lib.linux-x86_64-3.7/psycopg2
    copying lib/sql.py -> build/lib.linux-x86_64-3.7/psycopg2
    copying lib/pool.py -> build/lib.linux-x86_64-3.7/psycopg2
    copying lib/__init__.py -> build/lib.linux-x86_64-3.7/psycopg2
    running build_ext
    building 'psycopg2._psycopg' extension
    creating build/temp.linux-x86_64-3.7
    creating build/temp.linux-x86_64-3.7/psycopg
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSYCOPG_VERSION=2.9.1 (dt dec pq3 ext lo64) -DPSYCOPG_DEBUG=1 -DPG_VERSION_NUM=110012 -DHAVE_LO64=1 -DPSYCOPG_DEBUG=1 -I/usr/include/python3.7m -I. -I/usr/include/postgresql -I/usr/include/postgresql/11/server -I/usr/include/libxml2 -I/usr/include/mit-krb5 -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-3.7/psycopg/psycopgmodule.o -Wdeclaration-after-statement
    In file included from psycopg/psycopgmodule.c:28:
    ./psycopg/psycopg.h:35:10: fatal error: Python.h: No such file or directory
    #include <Python.h>
    ^~~~~~~~~~
    compilation terminated.

    It appears you are missing some prerequisite to build the package from source.

    You may install a binary package by installing 'psycopg2-binary' from PyPI.
    If you want to install psycopg2 from source, please install the packages
    required for the build and try again.

    For further information please check the 'doc/src/install.rst' file (also at
    <https://www.psycopg.org/docs/install.html>).

    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    ----------------------------------------
    ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5xcihcyy/psycopg2_b232b8f59c2740a586040461cb5807e2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5xcihcyy/psycopg2_b232b8f59c2740a586040461cb5807e2/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-f_rd8gjt/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.7/psycopg2 Check the logs for full command output.

    • Cette réponse a été modifiée le il y a 3 années et 3 mois par Thib.
    #1347
    BRICH Oussama
    Modérateur

    Essayez d’installer le package psycopg2-binary :

    pip3 install psycopg2-binary

    Pouvez nous dire quelle distribution linux vous utilisez pour cette installation ?

     

    #1348
    Thib
    Participant

    Correctif : Ajouter les librairies suivantes

    sudo apt install libpq-dev python3-dev gcc

7 sujets de 1 à 7 (sur un total de 7)
  • Vous devez être connecté pour répondre à ce sujet.