Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

359
Vistas
Installing SQLAlchemy with Poetry causes an AttributeErrorr

When installing with pip, pip install sqlalchemy all is ok.

When installing with poetry I am getting the error

➜  backend poetry add sqlalchemy
Using version ^1.4.23 for SQLAlchemy

Updating dependencies
Resolving dependencies... (0.1s)

  AttributeError

  'EmptyConstraint' object has no attribute 'allows'

  at ~/.poetry/lib/poetry/_vendor/py3.8/poetry/core/version/markers.py:291 in validate
      287│
      288│         if self._name not in environment:
      289│             return True
      290│
    → 291│         return self._constraint.allows(self._parser(environment[self._name]))
      292│
      293│     def without_extras(self):  # type: () -> MarkerTypes
      294│         return self.exclude("extra")
      295│
➜  backend
over 4 years ago · Santiago Trujillo
6 Respuestas
Responde la pregunta

0

Try upgrading poetry itself: pip install -U poetry. Worked for me to resolve SQLAlchemy issue.

over 4 years ago · Santiago Trujillo Denunciar

0

If you use

poetry add sqlalchemy=1.4.22

This will solve your problem

over 4 years ago · Santiago Trujillo Denunciar

0

Try poetry self update, then poetry update.

over 4 years ago · Santiago Trujillo Denunciar

0

I tried fl_'s answer but poetry self update itself failed for me with an error saying:

ModuleNotFoundError: No module named 'poetry.console'

From a stackoverflow answer to a different question I learned that I had poetry installed using the older, now deprecated, get-poetry.py.

So I uninstalled poetry like so:

curl https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py > get-poetry

python get-poetry --uninstall

Then reinstalled it with the newer install-poetry.py as per official installation instructions.

This finally made the original AttributeError go away.

over 4 years ago · Santiago Trujillo Denunciar

0

Same here, it seems to be a very recent problem. The good news is that "poetry self update" fixes the issue

over 4 years ago · Santiago Trujillo Denunciar

0

Upgrading poetry to 1.1.8 may solve the issue.

e.g. use poetry self update (related docs)

Check related poetry issue too:

https://github.com/python-poetry/poetry/issues/4410#issuecomment-902144234

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda