#PIP INSTALL IN ANACONDA PROMPT INSTALL#
Instead, create a new environment or install it to an environment you have already created. It’s recommended to not install rasterio to the ‘base’ conda environment. The rasterio package is available from the conda-forge anaconda channel so we just need to specify that channel during the install. Installation of rasterio with conda is simple. import rasterio Install rasterio with conda You do not need to import gdal to use rasterio. Pip install rasterio‑1.2.10‑cp38‑cp38‑win_amd64.whlĪfter using the above commands to install the downloaded wheel files you should be able to use rasterio successfully. To make things easy use the command prompt and cd to the directory whey you have downloaded the wheel files, then install with the following commands. Be sure to install gdal first, then rasterio. Once you have the wheel files downloaded install them with pip as follows. The numbers in the filename correspond to the python version (38 = python version 3.8) and operating system architecture (64 for 64-bit).
#PIP INSTALL IN ANACONDA PROMPT DOWNLOAD#
Make sure you download the wheel files for both gdal and rasterio. Note that this website is kind of the official unofficial source for python wheel files. You can access unofficial wheel files from this site. To install with pip we just need to download the wheel files for gdal and rasterio and use them for the install. Provide a path to gdal-config using a GDAL_CONFIG environment variable or use a GDAL_VERSION environment variable.ĭon’t worry. More information is available in the README.ĮRROR: A GDAL API version must be specified. INFO:root:Building on Windows requires extra options to setup.py to locate needed GDAL files. ERROR: Command errored out with exit status 1: If you do run the command pip install rasterio you’ll probably get an error message that contains at least some of the following text. Second, rasterio must also be installed from a wheel file or compiled from source ( see documentation here). First, rasterio depends on gdal and if you’ve ever installed gdal for python (on Windows) you know it must be installed from a wheel file or compiled from source code.
![pip install in anaconda prompt pip install in anaconda prompt](http://blog.efpsa.org/wp-content/uploads/2016/06/installing-numpy-scipy-windows7.png)
There are a couple of reasons why you will get errors if you try to run the command pip install rasterio as you would with most python packages. This article describes each method below in detail. There are dependable ways to install rasterio using both pip and conda. The rasterio package wraps around the Geospatial Data Abstraction Library (GDAL, also available as a python package) to provide core functionality for accessing raster data.Īs with gdal (guide for GDAL installation here), installing rasterio for python on Windows is not as simple as running pip install rasterio. The most used python package for reading and writing raster data is probably rasterio.