How to Install huggingface-hub in Python

v1.10.1 Data & Science Python >=3.10.0 Apache-2.0

Client library to download and publish models, datasets and other repos on the huggingface.co hub

Install pip install huggingface-hub

What is huggingface-hub?

Client library to download and publish models, datasets and other repos on the huggingface.co hub

The official Python client for the Huggingface Hub.

English | Deutsch | Français | हिंदी | 한국어 | 中文 (简体)

The library allows you to interact with the Hugging Face Hub, a platform democratizing open-source Machine Learning for creators and collaborators. Discover pre-trained models and datasets for your projects or play with the thousands of machine learning apps hosted on the Hub. You can also create and share your own models, datasets and demos with the community. The library provides a simple way to do all these things with Python.

Quick Start

Minimal example to get started with huggingface-hub:

import huggingface_hub

print(huggingface_hub.__version__)

Installation

pip (standard)

pip install huggingface-hub

Virtual environment (recommended)

python -m venv venv
source venv/bin/activate   # Windows: venv\Scripts\activate
pip install huggingface-hub

pip3

pip3 install huggingface-hub

conda

conda install -c conda-forge huggingface-hub

Poetry

poetry add huggingface-hub

Dependencies

Installing huggingface-hub will also install these packages:

Verify the Installation

After installing, confirm the package is available:

python -c "import huggingface_hub; print(huggingface_hub.__version__)"

If this prints a version number, installation succeeded. If you see a ModuleNotFoundError, see the errors section below.

Installation Errors

Common errors when installing huggingface-hub with pip.

ModuleNotFoundError: No module named 'huggingface_hub'

Cause: The package is not installed in the current Python environment.

Fix: Run pip install huggingface-hub. If using a virtual environment, ensure it is activated first.

ModuleNotFoundError: No module named 'huggingface_hub' (installed but still failing)

Cause: pip installed the package into a different Python than the one running your script.

Fix: Use python -m pip install huggingface-hub to install into the interpreter you are running.

ImportError: cannot import name 'X' from 'huggingface_hub'

Cause: The function or class does not exist in the installed version.

Fix: Check the version with pip show huggingface-hub and upgrade with pip install --upgrade huggingface-hub.

pip: command not found

Cause: pip is not in PATH or Python was not added to PATH during installation.

Fix: Try python -m pip install huggingface-hub. On macOS/Linux try pip3.

PermissionError: [Errno 13] Permission denied

Cause: No write access to the system Python package directory.

Fix: Use a virtual environment, or add --user: pip install --user huggingface-hub

SSL: CERTIFICATE_VERIFY_FAILED

Cause: pip cannot verify PyPI's SSL certificate — common behind corporate proxies.

Fix: Try: pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org huggingface-hub

MemoryError when loading data

Cause: Dataset is too large to fit in RAM.

Fix: Read in chunks, filter columns on load, or consider Polars/Dask for out-of-core processing.

Recent Releases

VersionReleased
1.10.0 2026-04-09
1.10.0rc0 2026-04-09
1.10.0rc1 2026-04-09
1.10.1 latest 2026-04-09
1.9.2 2026-04-08

Full release history on PyPI →

Manage huggingface-hub

Upgrade to latest version

pip install --upgrade huggingface-hub

Install a specific version

pip install huggingface-hub==1.10.1

Uninstall

pip uninstall huggingface-hub

Check what is installed

pip show huggingface-hub

Last updated: 2026-04-11 • Data from PyPI