Installing python InVEST via virtual machine

Dear all
Dear @jdouglass

Finally I received a dedicated (personal) virtual machine including admin. I can successfully run InVEST workbench (windows).

However. I still have permission problems when installing python on the virtual machine. I have now a python working solution for my old MAC, however, I would prefer the windows virtual machine. I am not sure if we can solve the error.

(base) PS C:\Users\f80809100> conda create -n env-invest -c conda-forge “python=3.11” natcap.invest
Channels:

  • conda-forge
  • defaults
    Platform: win-64
    Collecting package metadata (repodata.json): - Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)’)’: /conda-forge/win-64/repodata.json.zst

Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)’)’: /pkgs/msys2/win-64/repodata.json.zst

Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)’)’: /pkgs/r/noarch/repodata.json.zst

Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)’)’: /pkgs/main/win-64/repodata.json.zst

Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)’)’: /pkgs/main/noarch/repodata.json.zst

Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)’)’: /conda-forge/noarch/repodata.json.zst

Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)’)’: /pkgs/msys2/noarch/repodata.json.zst

Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)’)’: /pkgs/r/win-64/repodata.json.zst

  • Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)’)’: /pkgs/msys2/win-64/repodata.json.zst

Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)’)’: /pkgs/r/noarch/repodata.json.zst

Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)’)’: /pkgs/main/win-64/repodata.json.zst

Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)’)’: /conda-forge/win-64/repodata.json.zst

Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)’)’: /pkgs/msys2/noarch/repodata.json.zst

Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)’)’: /pkgs/main/noarch/repodata.json.zst

Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)’)’: /conda-forge/noarch/repodata.json.zst

Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)’)’: /pkgs/r/win-64/repodata.json.zst

| Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)’)’: /pkgs/main/win-64/repodata.json.zst

Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)’)’: /pkgs/r/noarch/repodata.json.zst

Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)’)’: /conda-forge/win-64/repodata.json.zst

Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)’)’: /pkgs/msys2/win-64/repodata.json.zst

Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)’)’: /conda-forge/noarch/repodata.json.zst

/ Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)’)’: /pkgs/msys2/noarch/repodata.json.zst

Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)’)’: /pkgs/r/win-64/repodata.json.zst

Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)’)’: /pkgs/main/noarch/repodata.json.zst

failed

CondaSSLError: Encountered an SSL error. Most likely a certificate verification issue.

Exception: HTTPSConnectionPool(host=‘conda.anaconda.org’, port=443): Max retries exceeded with url: /conda-forge/win-64/repodata.json.zst (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)’)))

(base) PS C:\Users\f80809100>

What is the issue or question you have?

What do you expect to happen?

What have you tried so far?

Upload the logfile using the :outbox_tray: button

It appears that this kind of logging can happen when the computer is using a proxy, or, in some cases, if it’s behind a firewall.

According to this helpful discussion on the conda forum, I think the most straightforward solution will be to try running:

conda config --set ssl_verify false

There’s another suggestion relating to the location of the server’s certificate, but I think the above suggestion will get you to a functioning environment faster, even if it isn’t ideal.

Thanks a lot @jdouglass

It definitively works with ssl_verify false.
However, for the last step, I need to stept in a bit more into conda.
I got the following fatal error

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# conda activate env-invest* *#* *# To deactivate an active environment, use* *#* *# conda deactivate

(base) C:\Users\f80809100>conda activate env-invest

(env-invest) C:\Users\f80809100>invest --help
Fatal error in launcher: Unable to create process using ‘“D:\bld\natcap.invest_1702949744735_h_env\python.exe” “C:\Users\f80809100\AppData\Local\miniconda3\envs\env-invest\Scripts\invest.exe” --help’: Das System kann die angegebene Datei nicht finden.

(env-invest) C:\Users\f80809100>invest list
Fatal error in launcher: Unable to create process using ‘“D:\bld\natcap.invest_1702949744735_h_env\python.exe” “C:\Users\f80809100\AppData\Local\miniconda3\envs\env-invest\Scripts\invest.exe” list’: Das System kann die angegebene Datei nicht finden.
(env-invest) C:\Users\f80809100>

(base) C:\Users\f80809100>conda config --set ssl_verify false

(base) C:\Users\f80809100>conda create -n env-invest -c conda-forge “python=3.11” natcap.invest
Retrieving notices: …working… C:\Users\f80809100\AppData\Local\miniconda3\Lib\site-packages\urllib3\connectionpool.py:1099: InsecureRequestWarning: Unverified HTTPS request is being made to host ‘proxy.agsad.admin.ch’. Adding certificate verification is strongly advised. See: Advanced Usage - urllib3 2.2.3.dev13 documentation
warnings.warn(
C:\Users\f80809100\AppData\Local\miniconda3\Lib\site-packages\urllib3\connectionpool.py:1099: InsecureRequestWarning: Unverified HTTPS request is being made to host ‘proxy.agsad.admin.ch’. Adding certificate verification is strongly advised. See: Advanced Usage - urllib3 2.2.3.dev13 documentation
warnings.warn(
C:\Users\f80809100\AppData\Local\miniconda3\Lib\site-packages\urllib3\connectionpool.py:1099: InsecureRequestWarning: Unverified HTTPS request is being made to host ‘proxy.agsad.admin.ch’. Adding certificate verification is strongly advised. See: Advanced Usage - urllib3 2.2.3.dev13 documentation
warnings.warn(
C:\Users\f80809100\AppData\Local\miniconda3\Lib\site-packages\urllib3\connectionpool.py:1099: InsecureRequestWarning: Unverified HTTPS request is being made to host ‘proxy.agsad.admin.ch’. Adding certificate verification is strongly advised. See: Advanced Usage - urllib3 2.2.3.dev13 documentation
warnings.warn(
done
Channels:

  • conda-forge
  • defaults
    Platform: win-64
    Collecting package metadata (repodata.json): done
    Solving environment: done

Package Plan

environment location: C:\Users\f80809100\AppData\Local\miniconda3\envs\env-invest

added / updated specs:
- natcap.invest
- python=3.11

The following packages will be downloaded:

package                    |            build
---------------------------|-----------------
appdirs-1.4.4              |     pyh9f0ad1d_0          13 KB  conda-forge
babel-2.14.0               |     pyhd8ed1ab_0         7.3 MB  conda-forge
blinker-1.8.2              |     pyhd8ed1ab_0          14 KB  conda-forge
blosc-1.21.6               |       h85f69ea_0          49 KB  conda-forge
boost-cpp-1.78.0           |       h9f4b32c_4        15.0 MB  conda-forge
brotli-python-1.1.0        |  py311h12c1d0e_1         315 KB  conda-forge
bzip2-1.0.8                |       h2466b09_7          54 KB  conda-forge
ca-certificates-2024.7.4   |       h56e8100_0         151 KB  conda-forge
cairo-1.16.0               |    hdecc03f_1016         1.5 MB  conda-forge
certifi-2024.7.4           |     pyhd8ed1ab_0         156 KB  conda-forge
cffi-1.16.0                |  py311ha68e1ae_0         290 KB  conda-forge
cfitsio-4.2.0              |       h9ebe7e4_0         546 KB  conda-forge
chardet-5.2.0              |  py311h1ea47a8_1         278 KB  conda-forge
charset-normalizer-3.3.2   |     pyhd8ed1ab_0          46 KB  conda-forge
click-8.1.7                | win_pyh7428d3b_0          83 KB  conda-forge
colorama-0.4.6             |     pyhd8ed1ab_0          25 KB  conda-forge
curl-8.9.1                 |       h1ee3ff0_0         154 KB  conda-forge
cython-0.29.37             |  py311h12c1d0e_0         2.2 MB  conda-forge
et_xmlfile-1.1.0           |     pyhd8ed1ab_0          10 KB  conda-forge
expat-2.6.2                |       h63175ca_0         224 KB  conda-forge
flask-3.0.3                |     pyhd8ed1ab_0          79 KB  conda-forge
flask_cors-4.0.0           |     pyhd8ed1ab_0          17 KB  conda-forge
flexcache-0.3              |     pyhd8ed1ab_0          16 KB  conda-forge
flexparser-0.3.1           |     pyhd8ed1ab_0          28 KB  conda-forge
font-ttf-dejavu-sans-mono-2.37|       hab24e00_0         388 KB  conda-forge
font-ttf-inconsolata-3.000 |       h77eed37_0          94 KB  conda-forge
font-ttf-source-code-pro-2.038|       h77eed37_0         684 KB  conda-forge
font-ttf-ubuntu-0.83       |       h77eed37_2         1.5 MB  conda-forge
fontconfig-2.14.2          |       hbde0cde_0         186 KB  conda-forge
fonts-conda-ecosystem-1    |                0           4 KB  conda-forge
fonts-conda-forge-1        |                0           4 KB  conda-forge
freetype-2.12.1            |       hdaf720e_2         498 KB  conda-forge
freexl-1.0.6               |       h67ca5e6_1          61 KB  conda-forge
gdal-3.5.3                 | py311heaf1029_28         1.5 MB  conda-forge
geos-3.11.2                |       h1537add_0         1.3 MB  conda-forge
geotiff-1.7.1              |       h7222e44_8         123 KB  conda-forge
gettext-0.22.5             |       h5728263_2          33 KB  conda-forge
gettext-tools-0.22.5       |       h7d00a51_2         3.3 MB  conda-forge
h2-4.1.0                   |     pyhd8ed1ab_0          46 KB  conda-forge
hdf4-4.2.15                |       h1334946_6         762 KB  conda-forge
hdf5-1.14.0                |nompi_h918d9b7_103         1.9 MB  conda-forge
hpack-4.0.0                |     pyh9f0ad1d_0          25 KB  conda-forge
hyperframe-6.0.1           |     pyhd8ed1ab_0          14 KB  conda-forge
icu-72.1                   |       h63175ca_0        12.6 MB  conda-forge
idna-3.7                   |     pyhd8ed1ab_0          51 KB  conda-forge
importlib-metadata-8.2.0   |     pyha770c72_0          27 KB  conda-forge
importlib_metadata-8.2.0   |       hd8ed1ab_0           9 KB  conda-forge
intel-openmp-2024.2.0      |     h57928b3_980         1.8 MB  conda-forge
itsdangerous-2.2.0         |     pyhd8ed1ab_0          19 KB  conda-forge
jinja2-3.1.4               |     pyhd8ed1ab_0         109 KB  conda-forge
kealib-1.5.1               |       hc8369a0_3         131 KB  conda-forge
krb5-1.21.3                |       hdf4eb48_0         695 KB  conda-forge
lcms2-2.15                 |       h3e3b177_1         487 KB  conda-forge
lerc-4.0.0                 |       h63175ca_0         190 KB  conda-forge
libaec-1.1.3               |       h63175ca_0          32 KB  conda-forge
libasprintf-0.22.5         |       h5728263_2          49 KB  conda-forge
libasprintf-devel-0.22.5   |       h5728263_2          35 KB  conda-forge
libblas-3.9.0              |     23_win64_mkl         5.0 MB  conda-forge
libcblas-3.9.0             |     23_win64_mkl         5.0 MB  conda-forge
libcurl-8.9.1              |       h18fefc2_0         331 KB  conda-forge
libdeflate-1.18            |       hcfcfb64_0         149 KB  conda-forge
libexpat-2.6.2             |       h63175ca_0         136 KB  conda-forge
libffi-3.4.2               |       h8ffe710_5          41 KB  conda-forge
libgdal-3.5.3              |      h36c8192_28         8.0 MB  conda-forge
libgettextpo-0.22.5        |       h5728263_2         167 KB  conda-forge
libgettextpo-devel-0.22.5  |       h5728263_2          39 KB  conda-forge
libglib-2.78.1             |       he8f3873_0         2.5 MB  conda-forge
libhwloc-2.11.1            |default_h8125262_1000         2.3 MB  conda-forge
libiconv-1.17              |       hcfcfb64_2         621 KB  conda-forge
libintl-0.22.5             |       h5728263_2          94 KB  conda-forge
libintl-devel-0.22.5       |       h5728263_2          40 KB  conda-forge
libjpeg-turbo-2.1.5.1      |       hcfcfb64_1         672 KB  conda-forge
libkml-1.3.0               |    h538826c_1020         1.6 MB  conda-forge
liblapack-3.9.0            |     23_win64_mkl         5.0 MB  conda-forge
libnetcdf-4.9.2            |nompi_ha5afab8_105         605 KB  conda-forge
libpng-1.6.43              |       h19919ed_0         339 KB  conda-forge
libpq-15.7                 |       h94c9ec1_0         3.3 MB  conda-forge
librttopo-1.1.0            |      he1da8c1_13         394 KB  conda-forge
libspatialindex-2.0.0      |       h5a68840_0         273 KB  conda-forge
libspatialite-5.0.1        |      hca1f1ac_26         7.5 MB  conda-forge
libsqlite-3.46.0           |       h2466b09_0         856 KB  conda-forge
libssh2-1.11.0             |       h7dfc565_0         261 KB  conda-forge
libtiff-4.5.1              |       h6c8260b_1         931 KB  conda-forge
libwebp-base-1.4.0         |       hcfcfb64_0         268 KB  conda-forge
libxml2-2.12.7             |       h0f24e4e_4         1.6 MB  conda-forge
libzip-1.10.1              |       h1d365fa_3         143 KB  conda-forge
libzlib-1.3.1              |       h2466b09_1          55 KB  conda-forge
lz4-c-1.9.4                |       hcfcfb64_0         131 KB  conda-forge
markupsafe-2.1.5           |  py311ha68e1ae_0          29 KB  conda-forge
mkl-2024.1.0               |     h66d3029_694       104.3 MB  conda-forge
natcap.invest-3.14.1       |  py311h12feb9d_0         1.1 MB  conda-forge
numpy-1.26.4               |  py311h0b4df5a_0         6.8 MB  conda-forge
openjpeg-2.5.0             |       ha2aaf27_2         232 KB  conda-forge
openpyxl-3.1.4             |  py311ha68e1ae_0         637 KB  conda-forge
openssl-3.3.1              |       h2466b09_2         8.0 MB  conda-forge
pandas-2.2.2               |  py311hcf9f919_1        13.9 MB  conda-forge
pcre2-10.40                |       h17e33f8_0         1.9 MB  conda-forge
pint-0.24.3                |     pyhd8ed1ab_0         223 KB  conda-forge
pip-24.2                   |     pyhd8ed1ab_0         1.2 MB  conda-forge
pixman-0.43.4              |       h63175ca_0         451 KB  conda-forge
poppler-23.05.0            |       h45d20d0_1         2.1 MB  conda-forge
poppler-data-0.4.12        |       hd8ed1ab_0         2.2 MB  conda-forge
postgresql-15.7            |       h94c9ec1_0        16.9 MB  conda-forge
proj-9.2.0                 |       heca977f_0         2.5 MB  conda-forge
psutil-6.0.0               |  py311he736701_0         516 KB  conda-forge
pthreads-win32-2.9.1       |       hfa6e2cd_3         141 KB  conda-forge
pycparser-2.22             |     pyhd8ed1ab_0         103 KB  conda-forge
pygeoprocessing-2.4.4      |  py311h3257749_0         946 KB  conda-forge
pyro4-4.77                 |             py_0          66 KB  conda-forge
pysocks-1.7.1              |     pyh0701188_6          19 KB  conda-forge
python-3.11.9              |h631f459_0_cpython        17.4 MB  conda-forge
python-dateutil-2.9.0      |     pyhd8ed1ab_0         218 KB  conda-forge
python-tzdata-2024.1       |     pyhd8ed1ab_0         141 KB  conda-forge
python_abi-3.11            |          4_cp311           7 KB  conda-forge
pytz-2024.1                |     pyhd8ed1ab_0         184 KB  conda-forge
requests-2.32.3            |     pyhd8ed1ab_0          57 KB  conda-forge
retrying-1.3.3             |     pyhd8ed1ab_3          16 KB  conda-forge
rtree-1.3.0                |  py311h3fabd8a_1          71 KB  conda-forge
scipy-1.14.0               |  py311hd4686c6_1        15.3 MB  conda-forge
serpent-1.41               |     pyhd8ed1ab_0          13 KB  conda-forge
setuptools-72.1.0          |     pyhd8ed1ab_0         1.4 MB  conda-forge
shapely-2.0.1              |  py311h343093d_1         455 KB  conda-forge
six-1.16.0                 |     pyh6c4a22f_0          14 KB  conda-forge
snappy-1.2.1               |       h23299a8_0          58 KB  conda-forge
sqlite-3.46.0              |       h2466b09_0         865 KB  conda-forge
taskgraph-0.11.1           |     pyhd8ed1ab_0          41 KB  conda-forge
tbb-2021.12.0              |       hc790b64_3         157 KB  conda-forge
tiledb-2.13.2              |       h3132609_0         3.2 MB  conda-forge
tk-8.6.13                  |       h5226925_1         3.3 MB  conda-forge
typing-extensions-4.12.2   |       hd8ed1ab_0          10 KB  conda-forge
typing_extensions-4.12.2   |     pyha770c72_0          39 KB  conda-forge
tzdata-2024a               |       h0c530f3_0         117 KB  conda-forge
ucrt-10.0.22621.0          |       h57928b3_0         1.2 MB  conda-forge
uriparser-0.9.8            |       h5a68840_0          48 KB  conda-forge
urllib3-2.2.2              |     pyhd8ed1ab_1          93 KB  conda-forge
vc-14.3                    |      h8a93ad2_20          17 KB  conda-forge
vc14_runtime-14.40.33810   |      ha82c5b3_20         734 KB  conda-forge
vs2015_runtime-14.40.33810 |      h3bf8584_20          17 KB  conda-forge
werkzeug-3.0.3             |     pyhd8ed1ab_0         237 KB  conda-forge
wheel-0.44.0               |     pyhd8ed1ab_0          57 KB  conda-forge
win_inet_pton-1.1.0        |     pyhd8ed1ab_6           8 KB  conda-forge
xerces-c-3.2.5             |       he0c23c2_1         3.4 MB  conda-forge
xlrd-2.0.1                 |     pyhd8ed1ab_3          92 KB  conda-forge
xz-5.2.6                   |       h8d14728_0         213 KB  conda-forge
zipp-3.19.2                |     pyhd8ed1ab_0          20 KB  conda-forge
zlib-1.3.1                 |       h2466b09_1         106 KB  conda-forge
zstandard-0.23.0           |  py311h53056dc_0         315 KB  conda-forge
zstd-1.5.6                 |       h0ea2cb4_0         341 KB  conda-forge
------------------------------------------------------------
                                       Total:       319.2 MB

The following NEW packages will be INSTALLED:

appdirs conda-forge/noarch::appdirs-1.4.4-pyh9f0ad1d_0
babel conda-forge/noarch::babel-2.14.0-pyhd8ed1ab_0
blinker conda-forge/noarch::blinker-1.8.2-pyhd8ed1ab_0
blosc conda-forge/win-64::blosc-1.21.6-h85f69ea_0
boost-cpp conda-forge/win-64::boost-cpp-1.78.0-h9f4b32c_4
brotli-python conda-forge/win-64::brotli-python-1.1.0-py311h12c1d0e_1
bzip2 conda-forge/win-64::bzip2-1.0.8-h2466b09_7
ca-certificates conda-forge/win-64::ca-certificates-2024.7.4-h56e8100_0
cairo conda-forge/win-64::cairo-1.16.0-hdecc03f_1016
certifi conda-forge/noarch::certifi-2024.7.4-pyhd8ed1ab_0
cffi conda-forge/win-64::cffi-1.16.0-py311ha68e1ae_0
cfitsio conda-forge/win-64::cfitsio-4.2.0-h9ebe7e4_0
chardet conda-forge/win-64::chardet-5.2.0-py311h1ea47a8_1
charset-normalizer conda-forge/noarch::charset-normalizer-3.3.2-pyhd8ed1ab_0
click conda-forge/noarch::click-8.1.7-win_pyh7428d3b_0
colorama conda-forge/noarch::colorama-0.4.6-pyhd8ed1ab_0
curl conda-forge/win-64::curl-8.9.1-h1ee3ff0_0
cython conda-forge/win-64::cython-0.29.37-py311h12c1d0e_0
et_xmlfile conda-forge/noarch::et_xmlfile-1.1.0-pyhd8ed1ab_0
expat conda-forge/win-64::expat-2.6.2-h63175ca_0
flask conda-forge/noarch::flask-3.0.3-pyhd8ed1ab_0
flask_cors conda-forge/noarch::flask_cors-4.0.0-pyhd8ed1ab_0
flexcache conda-forge/noarch::flexcache-0.3-pyhd8ed1ab_0
flexparser conda-forge/noarch::flexparser-0.3.1-pyhd8ed1ab_0
font-ttf-dejavu-s~ conda-forge/noarch::font-ttf-dejavu-sans-mono-2.37-hab24e00_0
font-ttf-inconsol~ conda-forge/noarch::font-ttf-inconsolata-3.000-h77eed37_0
font-ttf-source-c~ conda-forge/noarch::font-ttf-source-code-pro-2.038-h77eed37_0
font-ttf-ubuntu conda-forge/noarch::font-ttf-ubuntu-0.83-h77eed37_2
fontconfig conda-forge/win-64::fontconfig-2.14.2-hbde0cde_0
fonts-conda-ecosy~ conda-forge/noarch::fonts-conda-ecosystem-1-0
fonts-conda-forge conda-forge/noarch::fonts-conda-forge-1-0
freetype conda-forge/win-64::freetype-2.12.1-hdaf720e_2
freexl conda-forge/win-64::freexl-1.0.6-h67ca5e6_1
gdal conda-forge/win-64::gdal-3.5.3-py311heaf1029_28
geos conda-forge/win-64::geos-3.11.2-h1537add_0
geotiff conda-forge/win-64::geotiff-1.7.1-h7222e44_8
gettext conda-forge/win-64::gettext-0.22.5-h5728263_2
gettext-tools conda-forge/win-64::gettext-tools-0.22.5-h7d00a51_2
h2 conda-forge/noarch::h2-4.1.0-pyhd8ed1ab_0
hdf4 conda-forge/win-64::hdf4-4.2.15-h1334946_6
hdf5 conda-forge/win-64::hdf5-1.14.0-nompi_h918d9b7_103
hpack conda-forge/noarch::hpack-4.0.0-pyh9f0ad1d_0
hyperframe conda-forge/noarch::hyperframe-6.0.1-pyhd8ed1ab_0
icu conda-forge/win-64::icu-72.1-h63175ca_0
idna conda-forge/noarch::idna-3.7-pyhd8ed1ab_0
importlib-metadata conda-forge/noarch::importlib-metadata-8.2.0-pyha770c72_0
importlib_metadata conda-forge/noarch::importlib_metadata-8.2.0-hd8ed1ab_0
intel-openmp conda-forge/win-64::intel-openmp-2024.2.0-h57928b3_980
itsdangerous conda-forge/noarch::itsdangerous-2.2.0-pyhd8ed1ab_0
jinja2 conda-forge/noarch::jinja2-3.1.4-pyhd8ed1ab_0
kealib conda-forge/win-64::kealib-1.5.1-hc8369a0_3
krb5 conda-forge/win-64::krb5-1.21.3-hdf4eb48_0
lcms2 conda-forge/win-64::lcms2-2.15-h3e3b177_1
lerc conda-forge/win-64::lerc-4.0.0-h63175ca_0
libaec conda-forge/win-64::libaec-1.1.3-h63175ca_0
libasprintf conda-forge/win-64::libasprintf-0.22.5-h5728263_2
libasprintf-devel conda-forge/win-64::libasprintf-devel-0.22.5-h5728263_2
libblas conda-forge/win-64::libblas-3.9.0-23_win64_mkl
libcblas conda-forge/win-64::libcblas-3.9.0-23_win64_mkl
libcurl conda-forge/win-64::libcurl-8.9.1-h18fefc2_0
libdeflate conda-forge/win-64::libdeflate-1.18-hcfcfb64_0
libexpat conda-forge/win-64::libexpat-2.6.2-h63175ca_0
libffi conda-forge/win-64::libffi-3.4.2-h8ffe710_5
libgdal conda-forge/win-64::libgdal-3.5.3-h36c8192_28
libgettextpo conda-forge/win-64::libgettextpo-0.22.5-h5728263_2
libgettextpo-devel conda-forge/win-64::libgettextpo-devel-0.22.5-h5728263_2
libglib conda-forge/win-64::libglib-2.78.1-he8f3873_0
libhwloc conda-forge/win-64::libhwloc-2.11.1-default_h8125262_1000
libiconv conda-forge/win-64::libiconv-1.17-hcfcfb64_2
libintl conda-forge/win-64::libintl-0.22.5-h5728263_2
libintl-devel conda-forge/win-64::libintl-devel-0.22.5-h5728263_2
libjpeg-turbo conda-forge/win-64::libjpeg-turbo-2.1.5.1-hcfcfb64_1
libkml conda-forge/win-64::libkml-1.3.0-h538826c_1020
liblapack conda-forge/win-64::liblapack-3.9.0-23_win64_mkl
libnetcdf conda-forge/win-64::libnetcdf-4.9.2-nompi_ha5afab8_105
libpng conda-forge/win-64::libpng-1.6.43-h19919ed_0
libpq conda-forge/win-64::libpq-15.7-h94c9ec1_0
librttopo conda-forge/win-64::librttopo-1.1.0-he1da8c1_13
libspatialindex conda-forge/win-64::libspatialindex-2.0.0-h5a68840_0
libspatialite conda-forge/win-64::libspatialite-5.0.1-hca1f1ac_26
libsqlite conda-forge/win-64::libsqlite-3.46.0-h2466b09_0
libssh2 conda-forge/win-64::libssh2-1.11.0-h7dfc565_0
libtiff conda-forge/win-64::libtiff-4.5.1-h6c8260b_1
libwebp-base conda-forge/win-64::libwebp-base-1.4.0-hcfcfb64_0
libxml2 conda-forge/win-64::libxml2-2.12.7-h0f24e4e_4
libzip conda-forge/win-64::libzip-1.10.1-h1d365fa_3
libzlib conda-forge/win-64::libzlib-1.3.1-h2466b09_1
lz4-c conda-forge/win-64::lz4-c-1.9.4-hcfcfb64_0
markupsafe conda-forge/win-64::markupsafe-2.1.5-py311ha68e1ae_0
mkl conda-forge/win-64::mkl-2024.1.0-h66d3029_694
natcap.invest conda-forge/win-64::natcap.invest-3.14.1-py311h12feb9d_0
numpy conda-forge/win-64::numpy-1.26.4-py311h0b4df5a_0
openjpeg conda-forge/win-64::openjpeg-2.5.0-ha2aaf27_2
openpyxl conda-forge/win-64::openpyxl-3.1.4-py311ha68e1ae_0
openssl conda-forge/win-64::openssl-3.3.1-h2466b09_2
pandas conda-forge/win-64::pandas-2.2.2-py311hcf9f919_1
pcre2 conda-forge/win-64::pcre2-10.40-h17e33f8_0
pint conda-forge/noarch::pint-0.24.3-pyhd8ed1ab_0
pip conda-forge/noarch::pip-24.2-pyhd8ed1ab_0
pixman conda-forge/win-64::pixman-0.43.4-h63175ca_0
poppler conda-forge/win-64::poppler-23.05.0-h45d20d0_1
poppler-data conda-forge/noarch::poppler-data-0.4.12-hd8ed1ab_0
postgresql conda-forge/win-64::postgresql-15.7-h94c9ec1_0
proj conda-forge/win-64::proj-9.2.0-heca977f_0
psutil conda-forge/win-64::psutil-6.0.0-py311he736701_0
pthreads-win32 conda-forge/win-64::pthreads-win32-2.9.1-hfa6e2cd_3
pycparser conda-forge/noarch::pycparser-2.22-pyhd8ed1ab_0
pygeoprocessing conda-forge/win-64::pygeoprocessing-2.4.4-py311h3257749_0
pyro4 conda-forge/noarch::pyro4-4.77-py_0
pysocks conda-forge/noarch::pysocks-1.7.1-pyh0701188_6
python conda-forge/win-64::python-3.11.9-h631f459_0_cpython
python-dateutil conda-forge/noarch::python-dateutil-2.9.0-pyhd8ed1ab_0
python-tzdata conda-forge/noarch::python-tzdata-2024.1-pyhd8ed1ab_0
python_abi conda-forge/win-64::python_abi-3.11-4_cp311
pytz conda-forge/noarch::pytz-2024.1-pyhd8ed1ab_0
requests conda-forge/noarch::requests-2.32.3-pyhd8ed1ab_0
retrying conda-forge/noarch::retrying-1.3.3-pyhd8ed1ab_3
rtree conda-forge/win-64::rtree-1.3.0-py311h3fabd8a_1
scipy conda-forge/win-64::scipy-1.14.0-py311hd4686c6_1
serpent conda-forge/noarch::serpent-1.41-pyhd8ed1ab_0
setuptools conda-forge/noarch::setuptools-72.1.0-pyhd8ed1ab_0
shapely conda-forge/win-64::shapely-2.0.1-py311h343093d_1
six conda-forge/noarch::six-1.16.0-pyh6c4a22f_0
snappy conda-forge/win-64::snappy-1.2.1-h23299a8_0
sqlite conda-forge/win-64::sqlite-3.46.0-h2466b09_0
taskgraph conda-forge/noarch::taskgraph-0.11.1-pyhd8ed1ab_0
tbb conda-forge/win-64::tbb-2021.12.0-hc790b64_3
tiledb conda-forge/win-64::tiledb-2.13.2-h3132609_0
tk conda-forge/win-64::tk-8.6.13-h5226925_1
typing-extensions conda-forge/noarch::typing-extensions-4.12.2-hd8ed1ab_0
typing_extensions conda-forge/noarch::typing_extensions-4.12.2-pyha770c72_0
tzdata conda-forge/noarch::tzdata-2024a-h0c530f3_0
ucrt conda-forge/win-64::ucrt-10.0.22621.0-h57928b3_0
uriparser conda-forge/win-64::uriparser-0.9.8-h5a68840_0
urllib3 conda-forge/noarch::urllib3-2.2.2-pyhd8ed1ab_1
vc conda-forge/win-64::vc-14.3-h8a93ad2_20
vc14_runtime conda-forge/win-64::vc14_runtime-14.40.33810-ha82c5b3_20
vs2015_runtime conda-forge/win-64::vs2015_runtime-14.40.33810-h3bf8584_20
werkzeug conda-forge/noarch::werkzeug-3.0.3-pyhd8ed1ab_0
wheel conda-forge/noarch::wheel-0.44.0-pyhd8ed1ab_0
win_inet_pton conda-forge/noarch::win_inet_pton-1.1.0-pyhd8ed1ab_6
xerces-c conda-forge/win-64::xerces-c-3.2.5-he0c23c2_1
xlrd conda-forge/noarch::xlrd-2.0.1-pyhd8ed1ab_3
xz conda-forge/win-64::xz-5.2.6-h8d14728_0
zipp conda-forge/noarch::zipp-3.19.2-pyhd8ed1ab_0
zlib conda-forge/win-64::zlib-1.3.1-h2466b09_1
zstandard conda-forge/win-64::zstandard-0.23.0-py311h53056dc_0
zstd conda-forge/win-64::zstd-1.5.6-h0ea2cb4_0

Proceed ([y]/n)? y

Downloading and Extracting Packages:
mkl-2024.1.0 | 104.3 MB | ####3 | 6%
python-3.11.9 | 17.4 MB | ################3 | 22%
mkl-2024.1.0 | 104.3 MB | ##### | 7%
python-3.11.9 | 17.4 MB | ####################2 | 27%
postgresql-15.7 | 16.9 MB | ####################1 | 26%
mkl-2024.1.0 | 104.3 MB | #####8 | 8%
python-3.11.9 | 17.4 MB | #######################9 | 32%
postgresql-15.7 | 16.9 MB | #######################9 | 32%
mkl-2024.1.0 | 104.3 MB | ############################################################################ | 100%
python-3.11.9 | 17.4 MB | ############################################################################ | 100%
postgresql-15.7 | 16.9 MB | ############################################################################ | 100%
scipy-1.14.0 | 15.3 MB | ############################################################################ | 100%
boost-cpp-1.78.0 | 15.0 MB | ############################################################################ | 100%
pandas-2.2.2 | 13.9 MB | ############################################################################ | 100%
icu-72.1 | 12.6 MB | ############################################################################ | 100%
openssl-3.3.1 | 8.0 MB | ############################################################################ | 100%
libgdal-3.5.3 | 8.0 MB | ############################################################################ | 100%
libspatialite-5.0.1 | 7.5 MB | ############################################################################ | 100%
babel-2.14.0 | 7.3 MB | ############################################################################ | 100%
numpy-1.26.4 | 6.8 MB | ############################################################################ | 100%
libblas-3.9.0 | 5.0 MB | ############################################################################ | 100%
libcblas-3.9.0 | 5.0 MB | ############################################################################ | 100%
liblapack-3.9.0 | 5.0 MB | ############################################################################ | 100%
xerces-c-3.2.5 | 3.4 MB | ############################################################################ | 100%
tk-8.6.13 | 3.3 MB | ############################################################################ | 100%
libpq-15.7 | 3.3 MB | ############################################################################ | 100%

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

To activate this environment, use

$ conda activate env-invest

To deactivate an active environment, use

$ conda deactivate

(base) C:\Users\f80809100>conda activate env-invest

(env-invest) C:\Users\f80809100>invest --help
Fatal error in launcher: Unable to create process using ‘“D:\bld\natcap.invest_1702949744735_h_env\python.exe” “C:\Users\f80809100\AppData\Local\miniconda3\envs\env-invest\Scripts\invest.exe” --help’: Das System kann die angegebene Datei nicht finden.

(env-invest) C:\Users\f80809100>invest list
Fatal error in launcher: Unable to create process using ‘“D:\bld\natcap.invest_1702949744735_h_env\python.exe” “C:\Users\f80809100\AppData\Local\miniconda3\envs\env-invest\Scripts\invest.exe” list’: Das System kann die angegebene Datei nicht finden.

(env-invest) C:\Users\f80809100>

Based on the logging, it appears that a new environment was created with all of the correct packages in it.

This error message, however, hints at there being a different version of python that is being called than the one we expect.

As a first step of debugging, could you type the following and share the output with us? This will list out all of the python applications that are on the PATH:

where python

Second, what happens when you try to call InVEST using this instead?

python -m natcap.invest --list

Third, when you look at the directory C:\Users\f80809100\AppData\Local\miniconda3\envs\env-invest\Scripts\, do you see an invest.exe in there?

Let us know how this goes!

Yes I see invest.exe there:

Hmm python seems to be there, but still problem with invest:

(base) C:\Users\f80809100>where python
C:\Users\f80809100\AppData\Local\miniconda3\python.exe

(base) C:\Users\f80809100>python -m natcap.invest --list
C:\Users\f80809100\AppData\Local\miniconda3\python.exe: Error while finding module specification for ‘natcap.invest’ (ModuleNotFoundError: No module named ‘natcap’)

(base) C:\Users\f80809100>

There is another conda file here. On my MAC the InVEST env is within this .conda, but on my virtual machine, there is no InVEST env here.

This is also strange. python is installed, error: py written wrong or could not be found.

(base) C:\Users\f80809100>py --version
Der Befehl “py” ist entweder falsch geschrieben oder
konnte nicht gefunden werden.

(base) C:\Users\f80809100>py -m ensurepip --default-pip
Der Befehl “py” ist entweder falsch geschrieben oder
konnte nicht gefunden werden.

(base) C:\Users\f80809100>

I see, I have now no more admin rights on my personal virtual machine (this was just for some days). I reinstalled python (including path). Yes there are two python links when using “where python”.

(base) C:\Users\f80809100>py --version
Python 3.12.4

(base) C:\Users\f80809100>where python
C:\Users\f80809100\AppData\Local\miniconda3\python.exe
C:\Users\f80809100\AppData\Local\Programs\Python\Python312\python.exe

(base) C:\Users\f80809100>python -m natcap.invest --list
C:\Users\f80809100\AppData\Local\miniconda3\python.exe: Error while finding module specification for ‘natcap.invest’ (ModuleNotFoundError: No module named ‘natcap’)

(base) C:\Users\f80809100>

The first thing to note is that you’ll need to be careful about the environment that you are using.

When your command prompt says

(base) C:\Users\f80809100>

You can see that you are in the base environment. The natcap.invest package is not installed into the base environment.

Instead, you will need to activate your env-invest environment in order to use that python and InVEST:

conda activate env-invest

once you do this, your prompt should look like this:

(env-invest) C:\Users\f80809100>

Then you should be able to run python -m natcap.invest --list and have it use the correct python. Typing where python within an activated environment should also show the python located within the env-invest environment at the top of the list.

Dear @jdouglass
First many many thanks for your tremendous support. I see, I am missing basic python knowledge. I am now qutie happy to have successfully installed invest on my virtual windows machine.

There is only a small error left with “list”, do I need to replace with quotes on windows?

Many many thanks
Sibylle

(base) C:\Users\f80809100>conda activate env-invest

(env-invest) C:\Users\f80809100>python -m natcap.invest --list
usage: invest [-h] [–version] [-v | --debug] [–taskgraph-log-level {DEBUG,INFO,WARNING,ERROR}] [-L {en,es,zh}]

  •          {list,run,validate,getspec,serve,export-py} ...*
    

invest: error: unrecognized arguments: --list

(env-invest) C:\Users\f80809100>invest list
Fatal error in launcher: Unable to create process using ‘“D:\bld\natcap.invest_1702949744735_h_env\python.exe” “C:\Users\f80809100\AppData\Local\miniconda3\envs\env-invest\Scripts\invest.exe” list’: Das System kann die angegebene Datei nicht finden.

(env-invest) C:\Users\f80809100>invest run --help
Fatal error in launcher: Unable to create process using ‘“D:\bld\natcap.invest_1702949744735_h_env\python.exe” “C:\Users\f80809100\AppData\Local\miniconda3\envs\env-invest\Scripts\invest.exe” run --help’: Das System kann die angegebene Datei nicht finden.

(env-invest) C:\Users\f80809100>where python
C:\Users\f80809100\AppData\Local\miniconda3\envs\env-invest\python.exe
C:\Users\f80809100\AppData\Local\Programs\Python\Python312\python.exe

(env-invest) C:\Users\f80809100>python -m natcap.invest --list
usage: invest [-h] [–version] [-v | --debug] [–taskgraph-log-level {DEBUG,INFO,WARNING,ERROR}] [-L {en,es,zh}]

  •          {list,run,validate,getspec,serve,export-py} ...*
    

invest: error: unrecognized arguments: --list

(env-invest) C:\Users\f80809100>

Ha, that’s great! The issue here is that I told you to use --list instead of list … the correct syntax is to use the list subcommand like so in order to list out the InVEST models:

python -m natcap.invest list

In any case, the fact that it is actually parsing your command is fantastic and indicates that InVEST is (so far anyways) working as we expect.

So now, once you have activated your env-invest environment, you should be able to use the InVEST command-line interface to run models, or you can use python to execute a script that imports natcap.invest. Both should work as expected.

1 Like

So great many thanks @jdouglass

Here the final solution for the community

(base) C:\Users\f80809100>conda config --set ssl_verify false

(base) C:\Users\f80809100>conda activate env-invest

(env-invest) C:\Users\f80809100>py --version
Python 3.12.4

(env-invest) C:\Users\f80809100>where python
C:\Users\f80809100\AppData\Local\miniconda3\envs\env-invest\python.exe
C:\Users\f80809100\AppData\Local\Programs\Python\Python312\python.exe

(env-invest) C:\Users\f80809100>py -m pip --version
pip 24.0 from C:\Users\f80809100\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip (python 3.12)

(env-invest) C:\Users\f80809100>python -m natcap.invest list
Available models:

  • annual_water_yield (hwy, awy) Annual Water Yield*
  • carbon Carbon Storage and Sequestration*
  • coastal_blue_carbon (cbc) Coastal Blue Carbon*
  • coastal_blue_carbon_preprocessor (cbc_pre) Coastal Blue Carbon Preprocessor*
  • coastal_vulnerability (cv) Coastal Vulnerability*
  • crop_production_percentile (cpp) Crop Production: Percentile*
  • crop_production_regression (cpr) Crop Production: Regression*
  • delineateit DelineateIt*
  • forest_carbon_edge_effect (fc) Forest Carbon Edge Effect*
  • habitat_quality (hq) Habitat Quality*
  • habitat_risk_assessment (hra) Habitat Risk Assessment*
  • ndr Nutrient Delivery Ratio*
  • pollination Crop Pollination*
  • recreation Visitation: Recreation and Tourism*
  • routedem RouteDEM*
  • scenario_generator_proximity (sgp) Scenario Generator: Proximity Based*
  • scenic_quality (sq) Scenic Quality*
  • sdr Sediment Delivery Ratio*
  • seasonal_water_yield (swy) Seasonal Water Yield*
  • stormwater Urban Stormwater Retention*
  • urban_cooling_model (ucm) Urban Cooling*
  • urban_flood_risk_mitigation (ufrm) Urban Flood Risk Mitigation*
  • urban_nature_access (una) Urban Nature Access*
  • wave_energy Wave Energy Production*
  • wind_energy Wind Energy Production*
1 Like

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