Skip to content

Tag: python-poetry

Install packages in a certain order with Poetry

Is there a way to set the .toml file up so you will have the dependencies installed in a certain order with Poetry? Imagine I have the following .toml: How can I make sure wxPython always is installed first? Answer There is no way to tell Poetry to install packages in a certain order. The reason for this is, …

Why can’t I install a Python package with the Python requirement “>=3.8,<3.11" into a Poetry project with the Python version "^3.9"?

I’m having an issue installing dependencies into my Poetry project. If I run poetry new (as described in https://python-poetry.org/docs/basic-usage/), I can create a new project: My project structure looks like this after I delete a few files not needed for this reproduction: My pyproject.toml file look…

How to list the name of all Poetry extras?

I’m working on a project where I need to install all of the Poetry extras to run an automated build. What is the easiest way to get that list as a space-separated list, for use in poetry install –extras=”$extras”? Some possibilities: I could use the Python toml package, but that would …

import local package during poetry run

I just transitioned from pipenv to poetry and I’m having trouble importing a package from a local package I’m developing in a few of my scripts. To make this more concrete, my project looks something like: Within myscript.py, I import mypackage. But when I poetry run bin/myscript.py I get a Module…