Install Python module earthpy on Windows

I encountered numerous errors when I attempted to install the earthpy Python module and here’s how I eventually got it to work:

pip install wheel
pip install pipwin

pipwin install numpy
pipwin install pandas
pipwin install shapely
pipwin install gdal
pipwin install seaborn
pipwin install fiona
pipwin install pyproj
pipwin install rasterio

pip install earthpy

NOTE: both pip and pipwin are used.

I’m not sure if the numpy, pandas, shapely, seaborn, or pyproj modules are required but they are listed in the answer (on this post) I followed to get this install to work.

Now, here are some of the errors I saw:

C:\Users\seanys>pip install earthpy
Collecting earthpy
  Using cached earthpy-0.9.2-py3-none-any.whl
Requirement already satisfied: requests in c:\programs\python39\lib\site-packages (from earthpy) (2.25.1)
Collecting rasterio
  Using cached rasterio-1.2.6.tar.gz (2.2 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\programs\python39\python.exe' 'c:\programs\python39\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' get_requires_for_build_wheel 'C:\Users\SEANYS\AppData\Local\Temp\tmp0qsifvge'
       cwd: C:\Users\seanys\AppData\Local\Temp\pip-install-0485v2fx\rasterio_e7090cd79a674f70a7e38d8840dd9e56
  Complete output (2 lines):
  INFO:root:Building on Windows requires extra options to setup.py to locate needed GDAL files. More information is available in the README.
  ERROR: A GDAL API version must be specified. Provide a path to gdal-config using a GDAL_CONFIG environment variable or use a GDAL_VERSION environment variable.
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/d6/61/f083df6539a3ad5ddb480dd5551d55039b9f59948c68415a9737ea62081a/rasterio-1.2.6.tar.gz#sha256=24975b97fe2fc3fd282d59640baab19de431448e1b23be6b85b68fecc1362f88 (from https://pypi.org/simple/rasterio/) (requires-python:>=3.6). Command errored out with exit status 1: 'c:\programs\python39\python.exe' 'c:\programs\python39\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' get_requires_for_build_wheel 'C:\Users\SEANYS\AppData\Local\Temp\tmp0qsifvge' Check the logs for full command output.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.