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

Poetry: create a package from a part of a project

I am using Poetry to build some package. For simplicity sake the structure of the repository looks something like this: my_package pyproject.toml service client client.py data.py __init__.py …
0
votes
1 answer

Create Virtual Environment with native Python (w/out Conda_

Goal: create Python 3.8.8 venv. I've Python 3.8.10 installed Poetry project is Python 3.8.8 don't have conda I tried installing suggested package for creating a venv but this didn't work. How can I create a Python 3.8.8 venv without…
DanielBell99
  • 896
  • 5
  • 25
  • 57
0
votes
1 answer

Poetry NoCompatiblePythonVersionFound

I understand that the Poetry project is working with a different version of Python than I have installed. How might I rectify this issue though? Preferably, Poetry and the project can use the latest Python version. Terminal cd…
DanielBell99
  • 896
  • 5
  • 25
  • 57
0
votes
0 answers

ConnectionError on poetry add

I'd like to add SendGrid package using poetry. I do so using: poetry add sendgrid I then get the following error: ConnectionError HTTPConnectionPool(host='192.168.30.7', port=8080): Max retries exceeded with url: /sendgrid/ (Caused by…
locke14
  • 1,335
  • 3
  • 15
  • 36
0
votes
1 answer

Jenkins not able to run Poetry in batch file. Works when run manually

I'm attempting to get Jenkins to run a .bat file which contains a call to Poetry (for package management). However, when running this .bat file via Jenkins, I'm getting a "'poetry' is not recognized as an internal or external command, operable…
0
votes
1 answer

Install part of a pypi library with poetry

Does anyone know if I can install a python library's submodule with poetry? I can install with pip pip install library_a[sub_library] How can I do this in poetry?
Muhammad Raihan Muhaimin
  • 5,559
  • 7
  • 47
  • 68
0
votes
1 answer

Install latest python-poetry with a specific poetry-core commit

I need to install a version of poetry that has the poetry add --group support (currently version 1.2.0a2) but I need it to have this change in the poetry-core but I can't seem to change the poetry-core that is used by poetry even if I perform a pip…
DelboyJay
  • 2,799
  • 1
  • 13
  • 18
0
votes
1 answer

ModuleNotFoundError: No module named 'jiraglean.jiraglean'; 'jiraglean'

I am trying to run a tests file in a Django project, the app is called jira and project jiraglean , test file is tests.py I run the test with: jiraglean test jira.tests --settings=core.settings.test Which causes this error: File…
godhar
  • 1,128
  • 1
  • 14
  • 34
0
votes
2 answers

How can I make packages installed using Poetry accessible in Docker?

I have a Django REST framework API that I'm trying to run in Docker. The project uses Poetry 1.1.12. When running, I can see that Poetry is installed correctly, and that Poetry installs the packages in my pyproject.toml, including Django. I'm using…
0
votes
0 answers

Cannot install Python projects in readthedocs

I've got a couple of projects here for which I'm preparing documentation at the moment, hosted at readthedocs.org. FYI, all of them use poetry and I use custom .readthedocs.yml files with this entry: python: install: - method: pip path:…
The_Fallen
  • 257
  • 1
  • 3
  • 10
0
votes
1 answer

GitLab CI/CD pytests

I'm trying to understand one particular job in CI/CD pipeline, which has the following logic: test: stage: test image: python:3.8 rules: - if: $CI_COMMIT_TAG when: never - when: always before_script: -…
Konstantin
  • 75
  • 2
  • 8
0
votes
1 answer

ModuleNotFoundError: No module named 'poetry.console' when trying to uninstall poetry

First of all I ran poetry update which seemed to work. To verify if it actually updated my poetry version I ran poetry --version which resulted in the following error: Traceback (most recent call last): File "C:\Users\XXX\.poetry\bin\poetry", line…
0
votes
1 answer

Pyenv: activate local venv

I use poetry to manage my projects dependencies and tests. I usually create a new virtual environment for each project, with a .venv directory inside of the project directory. I would like to use pyenv virtualenv to automatically activate this…
matwasilewski
  • 384
  • 2
  • 11
0
votes
1 answer

Poetry add dependency within docker-compose

I am new to docker and poetry but are currently working in a project which contains both. Problem: I am unable to add new dependencies via poetry to the docker-compose container. Description: In pycharm I use docker-compose as my interpreter for a…
Andreas
  • 8,694
  • 3
  • 14
  • 38
0
votes
1 answer

Ray Cluster with Poetry

I am trying to launch a ray cluster and I am using Poetry as my package manager. Problem is when I run poetry run ray up config.yaml I get New status: setting-up [4/7] Running initialization commands Shared connection to XX.XX.XX.XX closed. …
HashBr0wn
  • 387
  • 1
  • 11