[Python] pip: cannot install dependencies from wheel built by poetry if pyproject.toml...

Discussão em 'Python' iniciado por Stack, Maio 27, 2025.

  1. Stack

    Stack Membro Participativo

    Im using poetry in my project to manage dependencies, so my pyproject.toml contains all my dependencies. My goal is is to build a wheel from the current project and install them in another virtualenv using pip. But I'm facing an error:

    pip._vendor.pkg_resources.RequirementParseError: Invalid URL: artifacts/pp-0.358.0.tar.gz


    I guess that the problem may be in the relative path, but I don't know how to fix it, because when installing dependencies, this package is taken from the tar.gz file located in this path.

    Here is my pyproject.toml:

    [tool.poetry]
    name = "package_name"
    version = "0.0.0"
    description = ""
    readme = "README.md"
    packages = [
    {include = "package1"},
    {include = "package2"},
    {include = "package3"},
    ]

    [tool.poetry.dependencies]
    python = "~3.8"
    pp = {file = "artifacts/pp-0.358.0.tar.gz"}
    ...some other deps


    To build a wheel I'm using the following command:

    poetry build --format wheel


    Then I'm trying to install the wheel in another virtualenv with following command:

    pip3 install /Users/av/Projects/package_name/dist/package_name-0.0.0-py3-none-any.whl


    Is there any way to fix it somehow? If I comment the pp line in dependencies installation then it works well.

    Continue reading...

Compartilhe esta Página