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
-1
votes
1 answer

Poetry managing environment System python

When I run poetry env info - I get the following: Virtualenv Python: 3.9.13 Implementation: CPython Path: /Users/me/Library/Caches/pypoetry/virtualenvs/my.project-NEejG4ix-py3.9 Valid: True System Platform: darwin OS: …
user19448827
  • 69
  • 1
  • 3
-1
votes
1 answer

poetry: create package to install in other directory

I have own pip package. I made the package with poetry. This package named my_pack. If I install this package, then it will install to location: ..\Programs\Python\Python37\Lib\site-packages\my_pack But, I need for files of my_pack will install to…
Alexex93
  • 21
  • 1
  • 6
-1
votes
1 answer

Poetry add package does not contain any functions

I installed word2number via poetry add poetry. However, I was unable to call any functions from word2number after the installation import word2number as w2n w2n.word_to_num('one') The following error happened AttributeError: module 'word2number'…
Boon
  • 75
  • 4
-1
votes
1 answer

Dockerfile & Poetry | executor failed running [/bin/sh -c poetry install --no-dev]: exit code: 1

Background Originally, I had this post on Unix & Linux; regarding adjusting my system clock. Solved by: sudo date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z" sudo apt get Then pip was failing as I had not…
user16341274
-1
votes
2 answers

poetry run, poetry add - ModuleNotFoundError

I am using Poetry version 1.1.7. I want to run CompositeKey_worker.py through poetry: poetry run python3 CompositeKey_worker.py. It states click isn't installed. I add click as a dependency, and ensure it is already installed. I run it again but…
user16341274
-1
votes
1 answer

Poetry: Managing PyPI dependencies without version number

I'm trying to use Poetry to manage my python projects, but some PyPI dependencies don't have a version number such as this one. I thus get such errors $ poetry update Updating dependencies Resolving dependencies... (0.5s) SolverProblemError …
kakyo
  • 10,460
  • 14
  • 76
  • 140
-1
votes
1 answer

Packaging a Python project and its associated IPython magic extension

I am in the process of deploying to Pypi a Python project, let's call it foobar. I would like to distribute it with a shell command and an IPython magic command. I use Poetry, and the relevant part of my .toml configuration file is: …
Aristide
  • 3,606
  • 2
  • 30
  • 50
-1
votes
2 answers

Python Poetry - How to Install 64-bit Virtual Environment?

How can I force Poetry to create a 64-bit virtual environment when I run poetry install for the first time? I'm sure I'm missing something simple, but I can't find anything in the docs, or in the command line help for Poetry itself.
Adam MacLeod
  • 413
  • 4
  • 9
-2
votes
2 answers

VSCode unable to autoimport python functions

I am currently able to use quick fix to auto import python functions from external typings such as from typing import List. Python module quick fix import However, I am unable to detect local functions/classes for import. For example: If I have the…
-3
votes
1 answer

Poetry can't find dependencies on installation

I'm trying to run a Django project. The project has the files poetry.lock and pyproject.toml and it runs on other computers, but I can't install it on my computer (macOS v12 (Monterey)). On my computer with the newly created virtual environment…
1 2 3
73
74