Skip to content

Python bindings fail to build without internet connection #5979

@yurivict

Description

@yurivict

Description

They build with the connection, but not in an isolated VM:

===>  Building for py39-lightgbm-4.0.0
building lightgbm
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: build>=0.10.0 in /usr/local/lib/python3.9/site-packages (0.10.0)
Requirement already satisfied: packaging>=19.0 in /usr/local/lib/python3.9/site-packages (from build>=0.10.0) (23.1)
Requirement already satisfied: pyproject_hooks in /usr/local/lib/python3.9/site-packages (from build>=0.10.0) (1.0.0)
Requirement already satisfied: tomli>=1.1.0 in /usr/local/lib/python3.9/site-packages (from build>=0.10.0) (2.0.1)
--- building wheel ---
* Creating venv isolated environment...
* Installing packages in isolated environment... (scikit-build-core>=0.4.4)
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x86f60fb80>: Failed to establish a new connection: [Errno 8] Name does not resolve')': /simple/scikit-build-core/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x86f60feb0>: Failed to establish a new connection: [Errno 8] Name does not resolve')': /simple/scikit-build-core/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x86f60fee0>: Failed to establish a new connection: [Errno 8] Name does not resolve')': /simple/scikit-build-core/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x8705b42e0>: Failed to establish a new connection: [Errno 8] Name does not resolve')': /simple/scikit-build-core/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x8705b4490>: Failed to establish a new connection: [Errno 8] Name does not resolve')': /simple/scikit-build-core/
ERROR: Could not find a version that satisfies the requirement scikit-build-core>=0.4.4 (from versions: none)
ERROR: No matching distribution found for scikit-build-core>=0.4.4

scikit-build-core-0.4.7 is already installed, which should be sufficient.

All packages are built in isolated VMs in most distros. For security reasons downloads aren't allowed.

How can we build Python bindings without internet connection?

Environment info

LightGBM version or commit hash: 4.0.0
Python-3.9
FreeBSD 13.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions