bvanosnabrugge / summaWorkflow_public

GNU General Public License v3.0
0 stars 4 forks source link

[Package] Environment creation fails on windows #11

Open wknoben opened 2 years ago

wknoben commented 2 years ago
Collecting rasterio
  Downloading rasterio-1.2.10.tar.gz (2.3 MB)
     ---------------------------------------- 2.3/2.3 MB 23.9 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'

Pip subprocess error:
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [2 lines of output]
      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.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

failed

CondaEnvException: Pip failed
wknoben commented 2 years ago

A simple fix is to explicitly tell conda to install rasterio by listing rasterio in environment.yml (presumbably needs to go after GDAL). That way conda worries about the paths, and when we get to the pip install part, rasterio is already present.

serrayos commented 2 years ago

Rasterio is already in environment.yml, but I still get the same error message. Any other solutions?

bartvanosnabrugge commented 2 years ago

Hi Serra, Which windows version are you on? We recently installed then environment of the master-branch on windows 10 without issue. However we heard about issues (with other but related programs) for windows 11.

Which branch environment did you try? The master and package branch have different environments. The master branch env is as specific as possible to reproduce an exact as possible env that was used for a certain hydrological modelling experiment. The environment under package is less strict and for future development.