How to Install Rasterio on MacOS?
Last Updated :
23 Jul, 2025
In this article, we will learn how to install Rasterio in Python on MacOS. Rasterio is used to access geospatial raster data.
Geographic information systems use GeoTIFF and other formats to organize and store gridded raster datasets such as satellite imagery and terrain models. Rasterio reads and writes these formats and provides a Python API based on Numpy N-dimensional arrays and GeoJSON
Installation:
Method 1: Using pip to install Rasterio Package
Follow the below steps to install the Rasterio package on macOS using pip:
Step 1: Install the latest Python3 in MacOS
Step 2: Check if pip3 and python3 are correctly installed.
python3 --version
pip3 --version
Step 3: Upgrade your pip to avoid errors during installation.
pip3 install --upgrade pip
Step 4: Enter the following command to install Rasterio using pip3.
pip3 install rasterio

Method 2: Using setup.py to install Rasterio
Follow the below steps to install the Rasterio package on macOS using the setup.py file:
Step 1: Download the latest source package of Rasterio for python3 from here.
curl https://files.pythonhosted.org/packages/5a/64/91fcf8482d5c380b68b4f69d5b0c75785db038b6923481b8e53234cf826f/rasterio-1.2.8.tar.gz > rasterio.tar.gz
Step 2: Extract the downloaded package using the following command.
tar -xzvf rasterio.tar.gz
Step 3: Go inside the folder and Enter the following command to install the package.
Note: Run the following two commands in terminal before installing via setup.py
Install homebrew before running the below command.
brew install gdal

pip3 install GDAL
Note: You must have developer tools for XCode MacOS installed in your system
cd rasterio-1.2.8
python3 setup.py install

Verifying Rasterio installation on macOS:
Make the following import in your python terminal to verify if the installation has been done properly:
import rasterio
If there is any error while importing the module then is not installed properly.
Similar Reads
How to Install Tix on MacOS? Tix is basically a powerful toolkit for creating graphical user interfaces (GUIs) in Python. It is built on top of the Tkinter module and provides additional widgets and features so in this article, we will understand the step-by-step process of installing Tix on MacOS. Key TerminologiesTix: It is a
4 min read
How to Install Theano on MacOS? Theano is a Python library that allows us to evaluate mathematical operations including multi-dimensional arrays so efficiently. It is mostly used in building Deep Learning Projects. It works way faster on Graphics Processing Unit (GPU) rather than on the CPU. In this article, we will look into the
1 min read
How to Install Tkinter on MacOS? In this article, we will learn how to install Tkinter in Python on MacOS. Tkinter is a Python binding to the Tk GUI toolkit. It is the standard Python interface to the Tk GUI toolkit, and is Python's de-facto standard GUI. Installation:Method 1: Using pip to install Tkinter Follow the below steps to
2 min read
How to Install PyBrain on MacOS? PyBrain is an open-source and free-to-use Python-based Machine Learning Library. Its main purpose is to provide machine learning tasks with flexible, easy-to-use, still a very powerful algorithms. It also provides a wide range of predefined environments which is used to test and compare different ty
2 min read
How to Install ReactJS on MacOS? Are you looking to set up ReactJS on your Mac? Whether youâre using a MacBook Air, MacBook Pro, iMac, or any macOS version like Monterey, Ventura, Big Sur, or macOS 15 Sequoia, this step-by-step guide is here to help. How To Install React on macOSTo install ReactJS on macOS, you first need to have N
5 min read
How to Install Seaborn on MacOS? In this article, we will learn how to install seaborn in Python on MacOS. Seaborn is a library for making statistical graphics in Python. It is built on top of matplotlib and is closely integrated with pandas data structures. Installation:Method 1: Using pip to install Seaborn Package Follow the bel
2 min read