Set up geospatial scientific Python with Miniconda on Windows

Anaconda is an excellent, simple way to get Python up and running on your computer. But, it includes a lot of packages you'll never use but consume gigs and gigs of hard drive space. Instead, you can just install miniconda and then choose the individual packages you need. The steps below explain how to do this to set up a Python environment for geospatial data science. These steps are Windows-specific, but the same process works on Mac or Linux (just don't download the wheels from Gohlke - conda/pip install them directly). If you're having trouble, here are more detailed instructions on getting geopandas and geospatial Python up and running.

Then install the packages not available with conda. Run (just use tab-complete to type in the names of the downloaded wheel files): pip install Rtree-whatever.whl basemap-whatever.whl GDAL-whatever.whl Shapely-whatever.whl Fiona-whatever.whl pyproj-whatever.whl geopy descartes geopandas osmnx

Add the path to GDAL (something like C:\Anaconda\Lib\site-packages\osgeo) to the Windows PATH environment variable

How to create a separate Python 2 virtual environment with conda

Some Python code or packages might still require Python 2 instead of the modern Python 3. This is easy to accomodate with conda by just setting up a Python 2 virtual environment.