You can supply a Python source archive through python-build's cache when pyenv's downloader cannot fetch it through the proxy.

  1. Read the failed build's requested URL and exact archive filename.
  2. Obtain that same artifact through the working, approved download route. Keep its filename: a .zip is not a substitute for a requested .tar.xz.
  3. Place it in a cache directory and select that directory for the retry:
PYTHON_BUILD_CACHE_PATH=/path/to/archive-cache pyenv install VERSION

Replace VERSION with the definition you selected. pyenv normally uses its cache directory when present; PYTHON_BUILD_CACHE_PATH makes the chosen location explicit.

When the definition declares a checksum, python-build checks the cached bytes against it. A matching filename alone is not sufficient.

If the retry gets past this archive and then attempts another download, inspect the newly requested package. A definition can need more than the Python archive, and the machine still needs its build tools and libraries. Populate the cache for the actual requests rather than treating one file as a complete offline build.

To restore normal downloads instead, identify and configure the downloader python-build selected. The browser that obtained the cached file may have a different proxy configuration.

Mikanda mikatakata