After installing te most recent Invest version (3.9.0), doe we also have to update python libs?


I had first installed Invest version 3.8.5 and recently installed the most recent version (3.9.0). But we run the Invest Urban Floodrisk mitigation application from python(Python 3.7.8), do we also have to update the python libs separately or is that not necessary?

If we run the ‘Urban Floodrisk mitigation’ application from python and there are multiple versions of Invest on the system, how do we know that python uses the most recent version (3.9.0) and not (3.8.5)

Thank you for the effort,

Greetings, Martijn

Hi @Martijn,
If you are installing the app from the download page (Windows .exe or mac .dmg) you do not need to worry about the python libraries, everything is included in the app binaries.

Are you using the python package (pip install natcap.invest) instead? You can run pip list to see which version you have. It should use the most recently installed version, but to be sure, it’s best to use a virtual environment to keep different versions of things separate. I recommend you check out a conda tutorial and then pip install natcap.invest into a fresh conda environment. It will also install the right versions of all the dependencies. (a few dependencies, like GDAL, can be troublesome).

Let me know if you have any problems with it.



We have de-installed Invest version 3.8.5 and have installed 3.9.0. But since we use the module (natcap.invest.urban_flood_risk_mitigation) specifically in python we also need to upgrade this module from 3.8.5 to 3.9.0 , And during this upgrade in python it goes wrong!

We work with Python 3.7.8 and have installed all modules to be able to work with 3.8.5. Now that we want to upgrade the natcap.invest module to 3.9.0 we get the following error messages (see upload logfile).

We use the following option to upgrade the module:
–upgrade natcap.invest

I’m curious about the solution to this problem. Should not be complicated to update these types of libraries when you come up with new Invest version so often

Thank`s for the effort,

Greetings, Martijn

upgrade_natcap_invest_logfile.txt (36.6 KB)

Hi @Martijn,
In your logfile there is the line Using legacy install for GDAL, since package 'wheel' is not installed. This means it’s installing from the source code rather than from a .whl. You can try pip install wheel and then install gdal, it may work that way.

If that doesn’t work, try installing from conda-forge. I usually have better luck with conda.
conda create -n env python==3.8
conda activate env
conda install gdal

You can also try installing a wheel from Gohlke.

I hope that helps. Unfortunately GDAL is often difficult to install. We supply the requirements.txt that works with pip because that is the standard, but it’s not always the best way to install complicated dependencies like gdal.

1 Like