[Python] pip install --no-index can't find setuptools

Discussão em 'Python' iniciado por Stack, Julho 14, 2025.

  1. Stack

    Stack Membro Participativo

    I have a computer that for security reasons has no public network access. The system starts with all necessary public Python dependencies installed, I just need to add the latest version of my own python package and run. I'm trying to install my package from the .tar.gz file by pip3 --no-index; --no-index is needed because otherwise pip tries to go out to a remote repository and fails. When I run "pip3 --no-deps --no-index mypackage-1.0.0.tar.gz", given an error like:

    × pip subprocess to install build dependencies did not run successfully.
    │ exit code: 1
    ╰─> [2 lines of output]
    ERROR: Could not find a version that satisfies the requirement setuptools>=57 (from versions: none)
    ERROR: No matching distribution found for setuptools>=57
    [end of output]


    But setuptools is there! When I run python, then "import setuptools," there it is. Version 59.6.0.

    I think maybe I need to add a --find-links option to tell it where to find setuptools, but that also seems to want a .whl file, and I don't have a .whl file - just the setuptools install in /usr/lib/python3/dist-packages. I tried adding a bunch of different --find-links local paths, none helped.

    Any idea how to fix this? Is the right --find-links option what I need, or do I need to download the .whl file for setup tools, or...?

    Continue reading...

Compartilhe esta Página