How to Install dataset in Python
Toolkit for Python-based database access.
pip install dataset
What is dataset?
Toolkit for Python-based database access.
In short, dataset makes reading and writing data in databases as simple as reading and writing JSON files.
Note: as of version 1.0, dataset is split into two packages, with the data export features now extracted into a stand-alone package, datafreeze. See the relevant repository here.
Quick Start
Minimal example to get started with dataset:
import dataset
print(dataset.__version__)
Installation
pip (standard)
pip install dataset
Virtual environment (recommended)
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install dataset
pip3
pip3 install dataset
conda
conda install -c conda-forge dataset
Poetry
poetry add dataset
Dependencies
Installing dataset will also install these packages:
Verify the Installation
After installing, confirm the package is available:
python -c "import dataset; print(dataset.__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 dataset with pip.
ModuleNotFoundError: No module named 'dataset'
Cause: The package is not installed in the current Python environment.
Fix: Run pip install dataset. If using a virtual environment, ensure it is activated first.
ModuleNotFoundError: No module named 'dataset' (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 dataset to install into the interpreter you are running.
ImportError: cannot import name 'X' from 'dataset'
Cause: The function or class does not exist in the installed version.
Fix: Check the version with pip show dataset and upgrade with pip install --upgrade dataset.
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 dataset. 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 dataset
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 dataset
Recent Releases
| Version | Released |
|---|---|
1.6.2 latest |
2023-07-12 |
1.6.0 |
2023-01-30 |
1.5.2 |
2021-12-16 |
1.5.1 |
2021-11-17 |
1.5.0 |
2021-04-22 |
Manage dataset
Upgrade to latest version
pip install --upgrade dataset
Install a specific version
pip install dataset==1.6.2
Uninstall
pip uninstall dataset
Check what is installed
pip show dataset