| Title: | Convenient Access to 'Python' 'Wheel' Packages Prepared for 'Windows' |
|---|---|
| Description: | Downloads pre-compiled 'Windows' 'wheel' files (.whl) for 'Python' geospatial packages from <https://github.com/cgohlke/geospatial-wheels>. These are unofficial binary installers for some geospatial libraries prepared by Christoph Gohlke. Wheels for various packages, 'Python' versions, and architectures are made available via 'GitHub' releases, providing the ability to revert to prior versions when needed. Automatically detects and matches Python versions, with support for virtual environments and conda environments. |
| Authors: | Andrew G. Brown |
| Maintainer: | Andrew G. Brown <[email protected]> |
| License: | CC0 |
| Version: | 0.1.0 |
| Built: | 2026-05-08 04:47:50 UTC |
| Source: | https://github.com/brownag/rgeowheels |
Scan the system for available Python environments including virtual environments, conda environments, and system Python.
detect_python_envs(include_system = TRUE, project_root = getwd())detect_python_envs(include_system = TRUE, project_root = getwd())
include_system |
Include system Python in results? Default: |
project_root |
Directory to scan for project-local virtual environments. Default: current working directory |
Scans for virtual environments in the following project-local directories (in order):
.venv, venv, .virtualenv, env
Also detects active virtual environment via VIRTUAL_ENV environment variable and active conda environment via CONDA_DEFAULT_ENV.
A data.frame with columns: type (venv/conda/system), path, version, active
## Not run: detect_python_envs() detect_python_envs(project_root = "/path/to/project") ## End(Not run)## Not run: detect_python_envs() detect_python_envs(project_root = "/path/to/project") ## End(Not run)
Extract the major.minor Python version from a Python binary.
detect_python_version(python = get_rgeowheels_python())detect_python_version(python = get_rgeowheels_python())
python |
Path to Python executable. Default: |
character Python version in major.minor format (e.g., "3.11")
## Not run: detect_python_version() detect_python_version("/path/to/venv/bin/python") ## End(Not run)## Not run: detect_python_version() detect_python_version("/path/to/venv/bin/python") ## End(Not run)
Install Python Wheels From 'geospatial-wheels' Repository
install_wheel( package, version = "latest", pyversion = "latest", architecture = "win_amd64", python = get_rgeowheels_python(), destdir = tempdir(), url_only = FALSE, download_only = FALSE )install_wheel( package, version = "latest", pyversion = "latest", architecture = "win_amd64", python = get_rgeowheels_python(), destdir = tempdir(), url_only = FALSE, download_only = FALSE )
package |
Python package name to install. e.g. |
version |
Python package version to install. Default |
pyversion |
Python version to install package for. Default |
architecture |
Target architecture for the wheel to install. Default |
python |
Path to Python executable to use for install. Default: |
destdir |
Destination directory for downloaded wheel file. Default: |
url_only |
Return the URL of the .whl file without downloading? Default: |
download_only |
Download .whl file without attempting install? Default: |
Called for side effects (download and install a Python wheel). Returns character containing path to .whl file when url_only=TRUE or download_only=TRUE.
List assets available from "geospatial-wheels" repository
list_rgeowheels_assets( release = NULL, update_cache = FALSE, check_freshness = FALSE )list_rgeowheels_assets( release = NULL, update_cache = FALSE, check_freshness = FALSE )
release |
Specify custom release to list assets for. Default: |
update_cache |
Force update of wheel download index? Default: |
check_freshness |
Check if cached data is from the latest release? Default: |
A data.frame containing package, version, pyversion, architecture and other metadata about each asset in a release.
Force update of the cached wheel download index from the latest GitHub release.
refresh_rgeowheels_cache()refresh_rgeowheels_cache()
Called for side effects. Updates the local cache with the latest available wheels.
Set the path the Python binary used to run installation commands. May be a system or virtual/conda environment.
set_rgeowheels_python(x) get_rgeowheels_python()set_rgeowheels_python(x) get_rgeowheels_python()
x |
Path to |
character Value of option "rgeowheels.python", or, if set, the value of the system environment variable "R_RGEOWHEELS_PYTHON". If neither are set, then the result of Sys.which("python") (or Sys.which("python3") if the former fails).