# Unable to install pygeoprocessing on Windows 10

**URL:** <https://community.naturalcapitalalliance.org/t/unable-to-install-pygeoprocessing-on-windows-10/2286>\
**Category:** Software Support\
**Tags:** python, pygeoprocessing\
**Created:** [November 7, 2021, 11:46pm UTC](https://community.naturalcapitalalliance.org/t/unable-to-install-pygeoprocessing-on-windows-10/2286 "2021-11-07T23:46:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![benaviru](https://avatars.discourse-cdn.com/v4/letter/b/b38774/32.png) [@benaviru](https://community.naturalcapitalalliance.org/u/benaviru)\
**Post date:** [November 7, 2021, 11:46pm UTC](https://community.naturalcapitalalliance.org/t/unable-to-install-pygeoprocessing-on-windows-10/2286/1 "2021-11-07T23:46:48Z")

</div>

Hello all,

Good day, I hope this topic reaches you well. I’m trying to install Pygeoprocessing on Windows 10 and I think after much tinkering, the main issue is the installation process not “seeing” my GDAL installation. Here’s a brief rundown of what I’ve done and tried:

1. Tried installing pygeoprocessing using pip and the command line  
– Used _py -m pip install pygeoprocessing_  
– Failed when it got to the part where it was installing GDAL

2. Per a previous topic ([Unable To Install Pygeoprocessing on Mac](https://community.naturalcapitalalliance.org/t/unable-to-install-pygeoprocessing-on-mac/1276)), tried installing GDAL some other way first  
– After trying and failing with other methods, I ended up using OSGeo4W to install it  
– When I checked on the command line with _gdalinfo --version_, it returns **GDAL 3.1.4, released 2020/10/20** so it looks like GDAL has successfully been installed

3. But when I try to run _py -m pip install pygeoprocessing_ from the command line, I see **Running setup.py install for GDAL …** and it eventually throws an error. So I’m wondering if I made a mistake in the installation somewhere that pip is just not “seeing” GDAL?

4. Tried editing the environment variables per this tutorial ([Setting up your GDAL and OGR Environmental Variables | GISforThought](https://gisforthought.com/setting-up-your-gdal-and-ogr-environmental-variables/)) and tried again, but that didn’t seem to work as I got the same error when trying Step 3 again.

I’m sure I’ve just made some very beginner mistake with paths, environment variables, or maybe in my GDAL install, but after searching and trying different things, I’m not sure how exactly to resolve the issue. If anyone has any previous experience, or has encountered this error before, I would greatly appreciate your input.

Thank you so much for your time.

---

<div class="post-metadata">

**Author:** ![jdouglass](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.naturalcapitalalliance.org/jdouglass/32/9_2.png) [@jdouglass](https://community.naturalcapitalalliance.org/u/jdouglass)\
**Post date:** [November 8, 2021, 5:32am UTC](https://community.naturalcapitalalliance.org/t/unable-to-install-pygeoprocessing-on-windows-10/2286/2 "2021-11-08T05:32:18Z")

</div>

Well, since `gdalinfo --version` works, that means that you’ve got your GDAL installation all setup properly, which is great!

My guess is that, in this case, I think OSGEO4W provides its own python … is that the case? If so, you may need to re-alias `py` to the python that’s in the OSGEO4W installation. Once that’s been done, you can test that GDAL is importable by running:

```auto
py -c "from osgeo import gdal"

```

And if that crashes with an error, then there’s still a problem. If there’s no message at all, then it worked.

There’s an alternate solution, which is that pygeoprocessing is available on the `conda-forge` channel. So if you have `conda` installed, setting up a virtual environment would be a matter of:

```auto
conda create -y -p ./env -c conda-forge pygeoprocessing
conda activate ./env

```

And that should do the trick, with an environment in your current working directory that has GDAL and everything else needed for pygeoprocessing to execute (including pygeoprocessing).

Let us know how this goes!  
James
