Installation¶
PyHelpers can be installed via uv (recommended for speed, reliability and modern dependency resolution), pixi, traditional pip or conda-forge.
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 drivers and database connectors):
> 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 all optional features inside an active virtual environment:
> uv pip install --upgrade "pyhelpers[full]"
To install the latest development version directly from GitHub:
> uv pip install --upgrade git+https://github.com/mikeqfu/pyhelpers.git
Using pixi¶
pixi is a modern package management tool built on top of conda-forge.
Adding to a pixi Project¶
To add the core PyHelpers package to a workspace using pixi:
> pixi add pyhelpers
To add PyHelpers along with optional dependencies (e.g. gdal, pyarrow and fiona) via pixi:
> pixi add pyhelpers gdal pyarrow fiona
Alternatively, to install PyHelpers with PyPI extras inside a pixi project:
> pixi add --pypi "pyhelpers[full]"
Installing globally¶
To install PyHelpers as a globally accessible tool via pixi:
> pixi global install pyhelpers
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
Using conda or mamba¶
PyHelpers is published on conda-forge and can be managed using conda or mamba.
Installing core package¶
To install PyHelpers into an active environment using conda or mamba:
> conda install -c conda-forge pyhelpers
> mamba install -c conda-forge pyhelpers
Installing full binary suite¶
To install PyHelpers alongside binary C-extension packages:
> conda install -c conda-forge pyhelpers gdal pyarrow fiona
> mamba install -c conda-forge pyhelpers gdal pyarrow fiona
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.3
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.