How to install Python - Geopandas in Windows on a Conda Environment - Tutorial

Geopandas is an amazing library for spatial analysis since in combines the spatial tools from Shapely and Fiona with the versatily of Pandas Dataframes. We are aware that most geoscientists, water resources specialists and related professionals work on Windows, therefore we are always in the search of new ways to get Python working with all its geospatial capabilities in every computer. We have created a tutorial that shows the installation process of Geopandas and other Python geospatial libraries in Windows by the use of a Conda environment.

Tutorial

Main steps

Create a environment called “geohatarilabs”:

conda create --name geohatarilabs

Activate the new environment:

conda activate geohatarilabs 

Install all the geospatial libraries together with jupyterlab and pandas. This is the step where you have to add additional packages to ensure compatibility.

conda install -c conda-forge fiona python=3.9 fiona shapely rasterio pyproj pandas jupyterlab geopandas

There are two ways to run jupyter lab

jupyter lab

python -m jupyterlab

When you want to get out of the environment:

conda deactivate

If you want to remove the environment:

conda env remove --name geohatarilabs

List all remaining environments:

conda env list


Test installation

To test your installation of geopandas please download and run the scripts on this link.

1 Comment

Saul Montoya

Saul Montoya es Ingeniero Civil graduado de la Pontificia Universidad Católica del Perú en Lima con estudios de postgrado en Manejo e Ingeniería de Recursos Hídricos (Programa WAREM) de la Universidad de Stuttgart con mención en Ingeniería de Aguas Subterráneas y Hidroinformática.

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.