How to Install folium in Python
Make beautiful maps with Leaflet.js & Python
pip install folium
What is folium?
Make beautiful maps with Leaflet.js & Python
builds on the data wrangling strengths of the Python ecosystem and the mapping strengths of the Leaflet.js library. Manipulate your data in Python, then visualize it in a Leaflet map via .
We love contributions! folium is open source, built on open source, and we'd love to have you hang out in our community.
- a repository of raster basemap tilesets. - run folium in a Streamlit app. - interactive visualization of finite element simulations on geographic maps with folium.
Quick Start
Minimal example to get started with folium:
import folium
print(folium.__version__)
Installation
pip (standard)
pip install folium
Virtual environment (recommended)
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install folium
pip3
pip3 install folium
conda
conda install -c conda-forge folium
Poetry
poetry add folium
Dependencies
Installing folium will also install these packages:
Verify the Installation
After installing, confirm the package is available:
python -c "import folium; print(folium.__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 folium with pip.
ModuleNotFoundError: No module named 'folium'
Cause: The package is not installed in the current Python environment.
Fix: Run pip install folium. If using a virtual environment, ensure it is activated first.
ModuleNotFoundError: No module named 'folium' (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 folium to install into the interpreter you are running.
ImportError: cannot import name 'X' from 'folium'
Cause: The function or class does not exist in the installed version.
Fix: Check the version with pip show folium and upgrade with pip install --upgrade folium.
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 folium. 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 folium
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 folium
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
| Version | Released |
|---|---|
0.20.0 latest |
2025-06-16 |
0.19.7 |
2025-06-03 |
0.19.6 |
2025-05-15 |
0.19.5 |
2025-02-27 |
0.19.4 |
2025-01-06 |
Manage folium
Upgrade to latest version
pip install --upgrade folium
Install a specific version
pip install folium==0.20.0
Uninstall
pip uninstall folium
Check what is installed
pip show folium