Coder Social home page Coder Social logo

Comments (14)

camillemonchicourt avatar camillemonchicourt commented on May 30, 2024

Commentaire de @20cents :

J'ai mis à jour tout ce qui concerne Flask + SqlAlchemy et Pillow. J'ai eu pas mal de taf avec Flask Marshmalow du coup j'ai pas fait Gunicorn.

Dans la branche dédiée : https://github.com/PnX-SI/GeoPaysages/blob/upgrade_py_deps/backend/requirements.txt

from geopaysages.

camillemonchicourt avatar camillemonchicourt commented on May 30, 2024

OK pour mettre Gunicorn de côté.
Par contre mettre à jour UsersHub-authentification-module en version 1.4.4.
Et merger dans la branche dev.

from geopaysages.

20cents avatar 20cents commented on May 30, 2024

@camillemonchicourt :
Il s'agit de passer de UsersHub-authentification-module 1.2.0 à 1.4.4
Pas de breaking change en vue ?

from geopaysages.

camillemonchicourt avatar camillemonchicourt commented on May 30, 2024

On vient de regarder avec @amandine-sahl qui maintient cet outil.
Il y a des améliorations et évolutions mais c'est en plus, rien qui casse le fonctionnement existant.
Et si c'est le cas, on investiguera de notre côté.
Donc tu peux monter en version 1.4.4. Et éventuellement faire un test d'installation de ton côté.

from geopaysages.

xavyeah39 avatar xavyeah39 commented on May 30, 2024

J'ai testé l'installation avec la branche update_py_deps qui intègre des màj de dépendances python + UsersHub-authentification-module en version 1.4.4
L'installation ne fonctionne pas avec les erreurs de dépendances ci-dessous liée à la version 1.4.4 de UsersHub-authentification-module :
...
Building wheels for collected packages: pypnusershub
Running setup.py bdist_wheel for pypnusershub ... done
Stored in directory: /tmp/pip-ephem-wheel-cache-nf5fkhzc/wheels/41/f5/35/e5e2783d06f104d9c6c12a2517ce984b4802098cbad76ff675
Successfully built pypnusershub
pypnusershub 1.4.4 has requirement flask==1.1.1, but you'll have flask 1.1.2 which is incompatible.
pypnusershub 1.4.4 has requirement flask-sqlalchemy==2.3.2, but you'll have flask-sqlalchemy 2.4.4 which is incompatible.
pypnusershub 1.4.4 has requirement psycopg2==2.8.5, but you'll have psycopg2 2.7.5 which is incompatible.
pypnusershub 1.4.4 has requirement sqlalchemy==1.3.19, but you'll have sqlalchemy 1.3.20 which is incompatible.
...

CEPENDANT,
L'installation fonctionne bien si l'on modifie la version de UsersHub-authentification-module en 1.4.5 publiée tout juste hier par @TheoLechemia 👍 et qui inclue màj des dépendances (dont les versions ne sont plus fixées).

EN REVANCHE,
si l'on tente de mettre à jour la version de psycopg2 de GeoPaysages de la 2.7.5 à la 2.8.5 dans le requirements.txt (oui je suis gourmand), des erreurs de compilation sont levées que je suis pas parvenu à solutionner (même en testant d'installer libpq-dev et python3-dev comme recommandé ici

Par ailleurs, je remarque que psycopg2-binary est également installé dans les dépendances bien que son usage ne soit pas préconisé en production semble-t'il. Voir ici.

J'ai fait pas mal de test avec psycopg2 et psycopg2-binary v2.8.5 + UAM v1.4.5 mais j'ai toujours cette erreurs de dépendances pour la compilation de psycopg2...

Si jamais quelqu'un de plus à l'aise que moi avec ces questions de dépendances a une idée pour cleané tout ça...

Voici un extrait du log :

----------------------------------------
  Failed building wheel for psycopg2
  Running setup.py clean for psycopg2
  Running setup.py bdist_wheel for pypnusershub ... done
  Stored in directory: /tmp/pip-ephem-wheel-cache-6b7d9v95/wheels/0d/29/b0/7e45fe4a46d446ed10f2655b540b5e5366c7667862d0adb445
Successfully built pypnusershub
Failed to build psycopg2
Installing collected packages: psycopg2, idna, urllib3, certifi, chardet, requests, pypnusershub
  Running setup.py install for psycopg2 ... error
    Complete output from command /home/MONUSER/geopaysages/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-xor2b18p/psycopg2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-g2ckl39f/install-record.txt --single-version-externally-managed --compile --install-headers /home/MONUSER/geopaysages/venv/include/site/python3.7/psycopg2:
    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/compat.py -> build/lib.linux-x86_64-3.7/psycopg2
    copying lib/pool.py -> build/lib.linux-x86_64-3.7/psycopg2
    copying lib/_json.py -> build/lib.linux-x86_64-3.7/psycopg2
    copying lib/sql.py -> build/lib.linux-x86_64-3.7/psycopg2
    copying lib/_lru_cache.py -> build/lib.linux-x86_64-3.7/psycopg2
    copying lib/__init__.py -> build/lib.linux-x86_64-3.7/psycopg2
    copying lib/extras.py -> build/lib.linux-x86_64-3.7/psycopg2
    copying lib/extensions.py -> build/lib.linux-x86_64-3.7/psycopg2
    copying lib/errors.py -> build/lib.linux-x86_64-3.7/psycopg2
    copying lib/_ipaddress.py -> build/lib.linux-x86_64-3.7/psycopg2
    copying lib/errorcodes.py -> build/lib.linux-x86_64-3.7/psycopg2
    copying lib/_range.py -> build/lib.linux-x86_64-3.7/psycopg2
    copying lib/tz.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.8.5 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=110009 -DHAVE_LO64=1 -I/home/MONUSER/geopaysages/venv/include -I/usr/include/python3.7m -I. -I/usr/include/postgresql -I/usr/include/postgresql/11/server -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-3.7/psycopg/psycopgmodule.o -Wdeclaration-after-statement
    unable to execute 'x86_64-linux-gnu-gcc': No such file or directory

    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

    ----------------------------------------
Command "/home/MONUSER/geopaysages/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-xor2b18p/psycopg2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-g2ckl39f/install-record.txt --single-version-externally-managed --compile --install-headers /home/MONUSER/geopaysages/venv/include/site/python3.7/psycopg2" failed with error code 1 in /tmp/pip-install-xor2b18p/psycopg2/

a++

from geopaysages.

camillemonchicourt avatar camillemonchicourt commented on May 30, 2024

OK merci pour ces tests et retours.

Du coup, en l'état déjà si on passe UsersHub-authentification-module en version 1.4.5 et qu'on laisse le reste en l'état, l'installation fonctionne ?

from geopaysages.

xavyeah39 avatar xavyeah39 commented on May 30, 2024

Oui c'est ce que j'ai constaté après plusieurs tests d'install (sur une même machine).

from geopaysages.

TheoLechemia avatar TheoLechemia commented on May 30, 2024

Tu es en quelle version de Python ?

from geopaysages.

xavyeah39 avatar xavyeah39 commented on May 30, 2024

Effectivement, sur cette VM de test (pourtant en Debian 10) je n'avais pas vérifié la version de Python par défaut (qui devrait être 3.7 si je ne m'abuse). Là, python --version me renvoie la 2.7.16 ....
Je n'ai pourtant rien modifié dans ce sens sur cette VM et python 3.7.3 et tout de même bien présent...
Tu penses que j'ai plutôt raté un truc ? Ou alors il manque quelque chose dans la procédure d'install ?

from geopaysages.

TheoLechemia avatar TheoLechemia commented on May 30, 2024

et si tu met dans ton virtualenv pour vérifier la version de python ?

from geopaysages.

xavyeah39 avatar xavyeah39 commented on May 30, 2024

Dans le venv c'est bien la 3.7.3 qui est utilisée

from geopaysages.

TheoLechemia avatar TheoLechemia commented on May 30, 2024

Ok, du coup je vois pas !
Tu peux regarder de ce côté: https://stackoverflow.com/questions/22571848/debugging-the-error-gcc-error-x86-64-linux-gnu-gcc-no-such-file-or-directory

from geopaysages.

xavyeah39 avatar xavyeah39 commented on May 30, 2024

Ok. Merci d'avoir jeter un coup d’œil.
Je creuse dès que j'ai un peu de temps. ++

from geopaysages.

camillemonchicourt avatar camillemonchicourt commented on May 30, 2024

OK intégré dans la branche dev et dans la 1.1.0 à venir, mais pas remis à jour ni psycopg2 pour le moment.

from geopaysages.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.