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 do I resolve error installing manim using poetry?

I want to setup manim community repo using poetry. I ran the command "poetry install". I am getting the following error. Python 3.8.5, Pip 20.2.4 EnvCommandError Command D:\manim\venv\Scripts\pip.exe install --no-deps…
0
votes
1 answer

Tox throws an error when running sphinx-build through Poetry in Docker container

I am trying to generate Sphinx documentation for a project using Poetry and Tox. I have this configuration: # tox.ini [tox] envlist = py36 isolated_build = True [tox:.package] basepython = python3 [testenv] whitelist_externals = poetry commands = …
0
votes
1 answer

Python Poetry Add gives an error

I have been playing with poetry to manage my project.I recently refactored my project.And now when I try to add a dependency to the project, I get the following error. $poetry add loguru Using version ^0.5.2 for loguru Updating…
0
votes
0 answers

pyproject.toml not found when using Poetry in Tox' parallel execution

I tried to switch a Python package of mine from setuptools to Poetry. Since I use Tox to orchestrate my test suite (with linters), I had to adapt my tox.ini as well. A minimal configuration of Tox which reproduces the problem looks as…
Max Görner
  • 674
  • 7
  • 16
0
votes
1 answer

debug_toolbar module is not persisted after docker down / docker up

I started a new project using Django. This project is build using Docker with few containers and poetry to install all dependencies. When I first run docker-compose up -d, everything is installed correctly. Actually, this problem is not related with…
GasKa
  • 663
  • 5
  • 25
0
votes
1 answer

Accessing ffprobe with pydub

I'm trying to get https://github.com/jiaaro/pydub working with the ffprobe and ffmpeg decoders on Alpine Linux 3.7.3 in Docker. Error is: /usr/lib/python3.6/site-packages/pydub/utils.py:198: RuntimeWarning: Couldn't find ffprobe or avprobe -…
KindOfGuy
  • 3,081
  • 5
  • 31
  • 47
0
votes
1 answer

Getting SSLError with poetry add networkx cmd

I am using poetry (1.0.10) to manage dependencies for a project. I am currently getting an SSLError when running poetry add networkx [SSLError] HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /pypi/networkx/json…
Mason Edmison
  • 594
  • 3
  • 16
0
votes
0 answers

How to tell pip to parallelise compilations

Whenever I build containers for my Python project on my desktop machine, it takes forever to install all of the Python dependencies. For the most part, the biggest slowdown comes from packages that require compilations, like numpy, lxml, etc. The…
Daniel Quinn
  • 6,010
  • 6
  • 38
  • 61
0
votes
0 answers

Pip installs unnecessarily conflicting dependencies for a library built with Poetry

I've specified the dependencies of a library using Poetry and ^ version constraints. The dependencies conflict if you just install the latest version of the dependencies, but they are resolvable and poetry install correctly resolves them. However,…
daturkel
  • 1
  • 1
0
votes
1 answer

selenium library not recognize by docker while it is added by poetry

I added the selenium library by using poetry like this python3 -m poetry add selenium, and it is showing that it already exists, but then I import this in a project and it shows there is no module named selenium.
0
votes
1 answer

Does entry_points declared using [tool.poetry.dependencies] are supposed to be available in "sub-projects"

Let's say I have a project foo with: [tools.poetry.scripts] foo-cli = 'foo:main' and a project bar with: [tool.poetry.dependencies] python = "^3.7" bar = {path = "../foo"} Is foo-cli supposed to be available in a virtualenv where bar is installed…
0
votes
1 answer

Create a spawn shell in Makefile

I want to create a makefile target in Ubuntun to spawn a poetry shell. Here are the things I want to do if I were in the command shell: type poetry shell, which is going to spawn a shell within the virtual environment. do something in the poetry…
w.tian
  • 21
  • 6
0
votes
0 answers

How can I deploy a Python script and its dependencies (no Internet connection)?

I have a production PC that won't have a decent Internet connection (e.g. let's say just the bare 'apt-get install ....', definitely no pip3) So I develop on a similar Linux OS/environment for the everyday work, but I'll push it to the final machine…
bli
  • 93
  • 6
0
votes
1 answer

Run a python module from an installed package

I have the following sample python application: - testapp -- __init__.py -- main.py -- hello ---- __init.py ---- hello.py -- world ---- __init__.py ---- world.py main.py from testapp.hello import hello from testapp.world import world if __name__…
bAN
  • 13,375
  • 16
  • 60
  • 93
0
votes
0 answers

How to use poetry publish to store whl to s3?

I used poetry build to create my_package.whl now I want to use poetry publish to publish it. I want to publish it to my own s3 bucket and not to PYPI. I tried to find an example online but couldn't find one. can someone share a link or example?
helpper
  • 2,058
  • 4
  • 13
  • 32