InVEST 3.10.1 x64 Installation problems

Hi,
I installed InVEST 3.10.1, but it doesn’t process. The program opens and closes in a few seconds. Happens for any InVEST 3.10.1 x64 model. Please, how to solve the problem?

Thank you!

1 Like

Hi @Dionee ,

This behavior happens when there’s an error as the application launches. You’re already using the latest version of InVEST, so that’s good! To better identify why this crash is happening, would you please do the following:

  1. Open up cmd.exe
  2. Run this command: "C:\Program Files\InVEST_3.10.1_x64\invest-3-x64\invest.exe" run carbon
  3. InVEST will print a bunch of text to the command prompt, so could you either screenshot that text or copy-paste it here into the thread so we can take a look? This text will help us understand why InVEST is crashing.

Thanks!
James

I use InVEST 3.8.2, but it doesn’t process with 30m resolution raster. Then, I installed the latest version and it has the problem of opening and closing fast, I didn’t open that other green window.

Yep, that happens sometimes where another version of InVEST works and this one doesn’t. So could you follow the steps I referenced above so we can see why this latest version of InVEST is crashing?

The message that appears:

C:\Users\User>C:\Program Files\InVEST_3.10.1_x64\invest-3-x64\invest.exe
‘C:\Program’ não é reconhecido como um comando interno
ou externo, um programa operável ou um arquivo em lotes.

Ah, the quotes are important! Since there’s a space in the program name, we’ll need to surround the program with quotation marks:

"C:\Program Files\InVEST_3.10.1_x64\invest-3-x64\invest.exe" run carbon

Note the double-quotes around "C:\Program Files\InVEST_3.10.1_x64\invest-3-x64\invest.exe"

Could you try running that?

Good Morning! Hi @jdouglass,

The result follows below:

C:\Users\User>“C:\Program Files\InVEST_3.10.1_x64\invest-3-x64\invest.exe”
Traceback (most recent call last):
File “osgeo_init_.py”, line 29, in swig_import_helper
File “importlib_init_.py”, line 127, in import_module
File “”, line 1014, in _gcd_import
File “”, line 991, in _find_and_load
File “”, line 975, in _find_and_load_unlocked
File “”, line 657, in _load_unlocked
File “”, line 556, in module_from_spec
File “”, line 1166, in create_module
File “”, line 219, in _call_with_frames_removed
ImportError: DLL load failed while importing _gdal: Uma rotina de inicialização da biblioteca de vínculo dinâmico (DLL) falhou.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “natcap\invest\cli.py”, line 18, in
File “PyInstaller\loader\pyimod03_importers.py”, line 476, in exec_module
File “natcap\invest\datastack.py”, line 33, in
File “PyInstaller\loader\pyimod03_importers.py”, line 476, in exec_module
File “osgeo_init_.py”, line 45, in
File “osgeo_init_.py”, line 41, in swig_import_helper
ImportError: Traceback (most recent call last):
File “osgeo_init_.py”, line 29, in swig_import_helper
File “importlib_init_.py”, line 127, in import_module
File “”, line 1014, in _gcd_import
File “”, line 991, in _find_and_load
File “”, line 975, in _find_and_load_unlocked
File “”, line 657, in _load_unlocked
File “”, line 556, in module_from_spec
File “”, line 1166, in create_module
File “”, line 219, in _call_with_frames_removed
ImportError: DLL load failed while importing _gdal: Uma rotina de inicialização da biblioteca de vínculo dinâmico (DLL) falhou.

On Windows, with Python >= 3.8, DLLs are no longer imported from the PATH.
If gdalXXX.dll is in the PATH, then set the USE_PATH_FOR_GDAL_PYTHON=YES environment variable
to feed the PATH into os.add_dll_directory().
[7208] Failed to execute script ‘cli’ due to unhandled exception!

Thank you!

Interesting! I’ve only seen this error in one other circumstance.

I’m curious if you could provide a little more information about your computer. Could you include the text of your “About your PC” window? I’m particularly interested in the “Device Specifications” portion. Or if you’d rather just use the “Copy” button to copy the text here, that works too.

Thanks,
James

1 Like

Hi,
I installed InVEST 3.10.1, but it doesn’t process. The program opens and closes in a few seconds. Happens for any InVEST 3.10.1 x64 model. Please, how to solve the problem?

Thank you!

Hi, jdouglass,

Processador: Intel (R) Celeron(R) CPU 1007U@ 1.50GHz 1.50GHz
RAM: 8.00GB
Windows 10

Thank you!

Thank you @Dionee ! I’m experiencing this on one of my computers as well, so I’ll look into this and get back to you.

Hi @jdouglass,

Thank you!

Hi @Dionee , I’m still gathering information about why this might be happening, and so I don’t immediately have a fix for you.

To help identify where this issue might be, could you run a diagnostic program for me? This program will print out a bunch of information about your computer’s CPU. Here are the steps to run:

  1. Download the Microsoft utility “Coreinfo”: Coreinfo - Windows Sysinternals | Microsoft Docs
  2. Unzip the program
  3. Open cmd.exe and run the coreinfo64.exe application that you just unzipped
  4. Copy and paste the program output and send it to me, either here in the thread, as a direct message, or over email, whatever is easiest.

I think this might ultimately be a hardware problem, and so this diagnostic information from your computer will be very useful!

Thanks in advance!
James

1 Like

Hello @jdouglass. I hope it is ok posting my issue here as I am also having an issue with installing 3.10.1. Apologies if I should have started a new thread.

I am trying to install InVEST via the InVEST Python Package. I keep getting an error that indicates that the numpy package cannot be found (ModuleNotFoundError: No module named ‘numpy’) after I used the ‘pip install natcap.invest==3.10.1’ command. It is ‘a ERROR: Command errored out with exit status 1’ error. However, my pip list says numpy is installed, and before the error I get: ‘Requirement already satisfied: numpy!=1.16.0’, which suggests that it is already installed, so I am confused. Could you provide any advice?

Many thanks

@EcoEvans could you tell me a bit more about your python installation setup? Are you using a conda environment, for example, or a virtualenv? Could you provide the log from your pip install command? The logging from pip in particular would be really helpful.

Thanks!
James

@jdouglass I am using a conda environment
pip install command:
ERROR: Command errored out with exit status 1:
command: ‘c:\programdata\miniconda3\envs\investing\python.exe’ ‘c:\programdata\miniconda3\envs\investing\lib\site-packages\pip_vendor\pep517\in_process_in_process.py’ get_requires_for_build_wheel ‘C:\Users\x\AppData\Local\Temp\tmphd5vtvs5’
cwd: C:\Users\x\AppData\Local\Temp\pip-install-4292t9uv\natcap-invest_1be1f115d567420993601987ddb2ab88
Complete output (16 lines):
Traceback (most recent call last):
File “c:\programdata\miniconda3\envs\investing\lib\site-packages\pip_vendor\pep517\in_process_in_process.py”, line 363, in
main()
File “c:\programdata\miniconda3\envs\investing\lib\site-packages\pip_vendor\pep517\in_process_in_process.py”, line 345, in main
json_out[‘return_val’] = hook(**hook_input[‘kwargs’])
File “c:\programdata\miniconda3\envs\investing\lib\site-packages\pip_vendor\pep517\in_process_in_process.py”, line 130, in get_requires_for_build_wheel
return hook(config_settings)
File “C:\Users\x\AppData\Local\Temp\pip-build-env-ekv119f7\overlay\Lib\site-packages\setuptools\build_meta.py”, line 163, in get_requires_for_build_wheel
config_settings, requirements=[‘wheel’])
File “C:\Users\x\AppData\Local\Temp\pip-build-env-ekv119f7\overlay\Lib\site-packages\setuptools\build_meta.py”, line 143, in _get_build_requires
self.run_setup()
File “C:\Users\x\AppData\Local\Temp\pip-build-env-ekv119f7\overlay\Lib\site-packages\setuptools\build_meta.py”, line 158, in run_setup
exec(compile(code, file, ‘exec’), locals())
File “setup.py”, line 16, in
import numpy
ModuleNotFoundError: No module named ‘numpy’

Ah, gotcha, that’s helpful. Thanks!

Ok, so the issue here is that pip is deciding that it needs to build natcap.invest from source, probably because you’re either running python 3.6, python 3.10, or you are using a 32-bit python environment and none of the wheels (all of which are 64-bit) will work.

The most direct solution here is to make sure that you have all of the dependencies needed to build natcap.invest installed into your conda environment before you compile natcap.invest. You can do this with:

conda install -c conda-forge numpy cython setuptools_scm wheel babel gdal
pip install "natcap.invest==3.10.1"

GDAL is not technically required to build natcap.invest, but it is needed at runtime and harder to compile on the command-line.

Alternatively, you can try doing this all in one step via conda with:

conda install -c conda-forge "natcap.invest==3.10.1"

Also note that the latest version of natcap.invest available is 3.10.2, so you might consider upgrading to get the latest bugfixes.

Let us know how this goes!
James

1 Like

Hi James @jdouglass,

Thank you for your answer.

I have tried both ways you suggested, neither seemed to work, but the latter suggested that it was because Python 3.6 is installed on this computer (as you suggested), even though ‘python --version’ stated 3.7! I have now uninstalled and reinstalled Python and InVEST and it seems to have worked.

Thanks again for your help

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.