Welcome! This guide contains the information you need to install CARTOframes.
Windows, macOS, GNU/Linux
Python 3.5+ (previous versions are not supported)
You can check your version by running:
1
python --version
If you don’t have Python installed, please install the latest version from python.org or refer to the Installing Python guide.
Although installing a Python environment is not strictly required, it’s highly recommended to have cleaner and more organized installations. You can check the tutorial on Creating Virtual Environments or Managing Conda Environments.
pip
The latest stable version of CARTOframes may be installed or upgraded via pip (Python Package Manager) by running one of the following commands:
Install the package:
1
pip install cartoframes
Upgrade the package to the latest version:
1
pip install --upgrade cartoframes
Install a specific version:
1
pip install cartoframes==1.x.y
If pip does not exist, you have to install it manually. See https://pip.pypa.io/en/stable/installing/.
RTree is a spatial index package to improve performance and is required for overlay operations. It provides an interface to libspatialindex.
CARTOframes needs that Shapely and Fiona libraries are already installed in your system. Execute these commands to install CARTOframes correctly:
1
2
3
pip install shapely
conda install -c conda-forge fiona
pip install cartoframes
CARTOframes is created to run in Jupyter Notebooks, which allows rendering powerful HTML visualizations. If you are not familiar with Jupyter Notebooks, we recommend reading this introduction.
To install CARTOframes through a Jupyter Notebook, run this command:
1
!pip install cartoframes
We collect data on the usage of CARTOframes to improve the library. Usage data includes information like “map_created,” which is the event triggered when a map is created. The collected usage data is anonymous and it does not contain the data processed, just the information of the event, and it’s handled in accordance with our Privacy Notice https://carto.com/privacy/ . You may choose to opt out by calling cartoframes.utils.setup_metrics(False)
.