Questions tagged [python-poetry]

Poetry is a Python tool to handle dependency installation, as well as the building and packaging of Python packages. Do NOT use this tag for poems written in the Python language, since this is off-topic on Stack Overflow.

Poetry is a Python tool to handle dependency installation as well as building and packaging of Python packages. Do not use this tag for poems written in Python language since this is off-topic on Stack Overflow.

What are the advantages of Poetry compared to other types of package management? From the documentation:

Packaging systems and dependency management in Python are rather convoluted and hard to understand for newcomers. Even for seasoned developers it might be cumbersome at times to create all files needed in a Python project: setup.py, requirements.txt, setup.cfg, MANIFEST.in and the newly added Pipfile.

So I wanted a tool that would limit everything to a single configuration file to do: dependency management, packaging and publishing.

It takes inspiration in tools that exist in other languages, like Composer (PHP) or Cargo (Rust).

And, finally, there is no reliable tool to properly resolve dependencies in Python, so I started poetry to bring an exhaustive dependency resolver to the Python community.

1108 questions
0
votes
1 answer

How does tox install my poetry project on its virtual environment?

I'm using tox with poetry with pyenv and I'm getting quite confused. I'm using pyenv local 3.6.9 3.7.10 to set several python versions in my myprojectroot folder. Above that, I use poetry to manage dependencies and the mypackage build. Finally, I…
emonier
  • 293
  • 1
  • 3
  • 13
0
votes
1 answer

How can I check poetry lockfile freshness without importing poetry

We've been using pipenv for dependency management for a while, and using micropipenv's protected functionality to check lock freshness - the idea here being that micropipenv is lightweight, so this is a cheap and cheerful way of ensuring that our…
ChickenWing
  • 639
  • 9
  • 24
0
votes
0 answers

Trouble running a python/poetry flask app under apache / wsgi

I've written a flask app using poetry and want to run it under the control of apache and wsgi. I've spent hours scouring documentation and experimenting and I've learned a lot but still have not figured it out. Here is the blow by blow: The app…
pitosalas
  • 10,286
  • 12
  • 72
  • 120
0
votes
2 answers

apache-airflow-backport-providers-google fails to install with apache-airflow(1.10.12)

We use apache-airflow 1.10.12 for our current system. We need some classes from providers available in airflow 2.*. The airflow docs recommend to use these classes in airflow 1.10 using the backport package. This will allow us to test the new…
malibu
  • 77
  • 3
  • 7
0
votes
1 answer

Remove venv folder from bandit scan

When I run poetry run bandit -r . inside my root project's folder root, it consider the .venv path. My folder structure is: root ├── ... ├── my_package ├── .venv └── ... How could I avoid this? I've tried the -x…
Henrique Branco
  • 1,778
  • 1
  • 13
  • 40
0
votes
0 answers

No module named _sqlite3 on python 3.9.2 virtual environment created with pyenv and poetry

I created a virtual environment with poetry as usual by running: pyenv install 3.9.2 pyenv local 3.9.2 poetry env use 3.9.2 poetry install poetry shell I can effectively see a .python-version file where I can read "3.9.2" and python -V successfully…
a-s-r-789
  • 61
  • 1
  • 6
0
votes
2 answers

Install pycocotools with poetry( not PEP 517/518 compliant)

I am trying to install Pycocotools(PythonAPI) package with Poetry, but it fails to do so. As read in this case, it seems that this package is not packaged properly, and therefore poetry is unable to install it. I tried to follow the procedure on…
0
votes
1 answer

How to properly setup poetry environment with python?

This is my first time setting up poetry. My project structure looks like this: bert-api bert_api bert __init__.py predict.py data docs tests venv poetry.lock pyproject.toml I…
barcaman
  • 107
  • 11
0
votes
1 answer

poetry: How to ignore beta version and install latest alpha version?

I've a package registry for my package framework. I want to get the latest alpha version from the package registry while there are beta versions available for same release. Example Registry: - framework 0.0.1a0 - framework 0.0.1a1 - framework…
PaxPrz
  • 1,778
  • 1
  • 13
  • 29
0
votes
2 answers

Should an embedded SQLite DB used by CLI app be uploaded to version-control (Git)?

I'm working on a Python CLI app that has to manage some data on a sqlite db (creating, updating and deleting records). I want the users to be able to install the app and use it right away. So my question is, can I just upload an empty sqlite db to…
harmony5
  • 3
  • 1
  • 4
0
votes
0 answers

AWS Codebuild not progressing in build phase

I have the following buildspec.yml file version: 0.2 env: parameter-store: s3DestFileName: "/CodeBuild/s3DestFileName" s3SourceFileName: "/CodeBuild/s3SourceFileName" imgFileName: "/CodeBuild/imgFileName" imgPickleFileName:…
0
votes
1 answer

How to use pyenv like conda?

I'm currently using both pyenv and conda. With pyenv I keep creating local python environment in individual folders using poetry. With conda (acutally miniconda) I use different python environments across folders. Since it's very annoying to always…
mcExchange
  • 6,154
  • 12
  • 57
  • 103
0
votes
0 answers

Installing conda environment for python project using poetry fail

In my current project I'm using conda environment with following content. environment.yml dependencies: - python 3.7.* - setuptools 49.1 - pip - pip: - poetry - toml - . But when I'm running the command to create…
chaotic
  • 391
  • 3
  • 6
  • 19
0
votes
0 answers

Locally installed Python vs system-wide installation

I've got the following error with $ poetry install, while creating a virtual environment, probably. ImportError cannot import name 'enquote_executable' from 'distlib.scripts' (/home/alexey/.local/lib/python3.9/site-packages/distlib/scripts.py) at…
Alexey Orlov
  • 2,412
  • 3
  • 27
  • 46
0
votes
1 answer

How to specify flask entry_points in plugins that use project.toml instead of setup.py

We have some in-house python libraries which we install from our private index. Some of them provide a few CLI commands which we make available to our flask projects by using the pattern described on the flask documentation page. We would like to…
Mihail
  • 81
  • 1
  • 5