Installation¶
PyHelpers can be installed using uv (recommended for speed, reliability and modern dependency resolution) or traditional pip.
Using uv (Recommended)¶
uv is a fast Python package installer and project manager written in Rust.
Adding to a uv Project¶
To add the latest release of PyHelpers to your existing project managed by uv:
> uv add pyhelpers
To include all optional dependencies (e.g. geospatial and data manipulation libraries):
> uv add "pyhelpers[full]"
Installing in a Virtual Environment¶
If you are working inside an active virtual environment and wish to install PyHelpers directly using uv pip:
> uv pip install --upgrade pyhelpers
To install the latest development version directly from GitHub:
> uv pip install --upgrade git+https://github.com/mikeqfu/pyhelpers.git
Using pip¶
If you prefer standard Python packaging tools, ensure your virtual environment is activated and use pip install:
> pip install --upgrade pyhelpers
To install with all optional dependencies:
> pip install --upgrade "pyhelpers[full]"
To install the development version from GitHub:
> pip install --upgrade git+https://github.com/mikeqfu/pyhelpers.git
Note
Windows Users Installing Geospatial Dependencies via ``pip``:
Standard pip installation of C-extension packages such as gdal or fiona may fail on Windows due to missing C++ compilers and underlying C libraries. (When using uv, this wheel index is configured automatically).
If you use pip rather than uv, install pre-compiled wheel files directly from the geospatial-wheels repository index:
> pip install gdal --find-links https://nathanjmcdougall.github.io/geospatial-wheels-index/
Alternatively, download the appropriate .whl file matching your Python version and architecture from geospatial-wheels releases and install it manually:
> pip install path/to/gdal-3.x.x-cp3x-cp3x-win_amd64.whl
Verification¶
To verify the installation, import the package in a Python interpreter shell:
>>> import pyhelpers
>>> pyhelpers.__version__ # Check the latest version
The latest version is: 2.5.2
Note
Core dependencies are installed automatically. To keep the base installation lightweight, optional features (e.g. advanced geospatial tools or database connectors) require extra dependencies. Install these using the
[full]extra (e.g.pyhelpers[full]) or install individual missing packages as indicated by any ModuleNotFoundError.For general guidelines on Python virtual environments and dependency management, refer to the Python Packaging User Guide.