GDAL error when installing Geopandas/Fiona in venv isolation mode

I want to switch from using the isolation mode from Docker to venv, so I used the viktor-cli configure command and provided the path to my Python installation. This env contains several packages including Geopandas, which has Fiona as a dependency.

While I encountered no problems using Docker, I get the error below regarding Fiona and GDAL when using venv. The same error pops up when simply installing Geopandas in a regular venv, so it is not necessarily a problem related to VIKTOR, but it does prevent me from the venv isolation mode. Does anyone know a solution for this?

WARNING: you are developing with Python 3.8, while the published app runs on Python 3.7. The Python version of the published app can be specified by setting 'python_version' in the viktor.config.toml file

SDK version: 13.2.1 Connector version: 5.16.0
Creating app specific install dir signals
Creating virtual environment
Looking in indexes:****
Collecting viktor==13.2.1
  Downloading (7.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.7/7.7 MB 9.9 MB/s eta 0:00:00
Collecting viktor-connector==5.16.0
  Downloading (674 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 674.4/674.4 KB 10.7 MB/s eta 0:00:00

Collecting geopandas==0.9.0
  Using cached geopandas-0.9.0-py2.py3-none-any.whl (994 kB)
Collecting pandas<2.0.0,>=0.23.4
  Using cached pandas-1.4.3-cp38-cp38-win_amd64.whl (10.6 MB)
Collecting fiona>=1.8
  Using cached Fiona-1.8.21.tar.gz (1.0 MB)
  Preparing metadata ( ... error
  error: subprocess-exited-with-error

  × python egg_info did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      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: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Exiting because of an error: installation of the app failed

Hi Martijn,

On Windows GDAL needs to be built from source. The error is caused by the fact that not all build dependencies required for this process are correctly set up. You can either try to get everything sorted in order to built the Python package from source or you can use an unofficial distribution as explained in the second bullet of this link: Getting Started - Troubleshooting | VIKTOR Documentation. Please not that you will need to account for the fact that published apps will run on Linux.