确认Python版本和操作系统: 确保你的Python版本是3.8或更高,并且你正在使用Windows操作系统。这是问题的前提条件。 设置环境变量USE_PATH_FOR_GDAL_PYTHON: 你需要设置环境变量USE_PATH_FOR_GDAL_PYTHON为YES。这可以通过多种方式完成,例如在命令提示符中临时设置:bash...
步骤:首先打开控制面板>搜索“高级系统设置”,找到“环境变量”,点击“新建”,变量名输入:USE_PATH_FOR_GDAL_PYTHON,变量值输入:YES,点击确定即可消除该异常。 也可编辑path增加常用的python包路径,点击确定即可。
Usingsetup-condato install gdal 3+ on Ubuntu 18.04 and noticedGDAL_DATAandPROJ_LIBenvironment variables are not being set. This was noticed by getting the following error in one of our tests for a Python project when trying to use the gdal library: ...
In case it helps anyone, I upgraded my Unity C# based project to use GDAL 3.8.1 from nuget and ran into this error. For reference, I've got the DLLs from the main GDAL nuget in Assets\Plugins\GDAL, and the data and share and x64 folders from GDAL.native as subfolders under Assets...