8

If I mention "gdal = '2.2.3'" in the Pipfile and launch the instruction pipenv install, the install fails.

If I launch the instruction CFLAGS="-I /usr/include/gdal" CXXFLAGS="-I /usr/include/gdal" pipenv install GDAL==2.2.3 the install succeed.

Is there a way to add the options 'CFLAGS="-I /usr/include/gdal" CXXFLAGS="-I /usr/include/gdal"' into the Pipfile so that they are taken in consideration when launching 'pipenv install'?

1 Answers1

1

Potential solution: create a .env file defining the CFLAGS etc environment variables in your project directory.

Pipenv automatically reads this file if it exists and instantiates any environment variables, when the venv is activated.

Source: https://pipenv.pypa.io/en/latest/advanced/#automatic-loading-of-env

william_grisaitis
  • 5,170
  • 3
  • 33
  • 40