Anaconda - With Python 3.8 DLLs are no longer imported from the PATH
Dear @danschef
I've just installed AROSICS on Windows 10 using Anaconda, but when I try to run it, I get this error:
(arosics) PS C:\Users\PedroVenancio> arosics --version
Traceback (most recent call last):
File "C:\Users\PedroVenancio\.conda\envs\arosics\lib\site-packages\osgeo\__init__.py", line 21, in swig_import_helper
return importlib.import_module(mname)
File "C:\Users\PedroVenancio\.conda\envs\arosics\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 657, in _load_unlocked
File "<frozen importlib._bootstrap>", line 556, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 1166, in create_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: DLL load failed while importing _gdal: Impossível localizar o procedimento especificado.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\PedroVenancio\.conda\envs\arosics\Scripts\arosics-script.py", line 6, in <module>
from arosics.arosics_cli import main
File "C:\Users\PedroVenancio\.conda\envs\arosics\lib\site-packages\arosics\__init__.py", line 31, in <module>
from arosics.CoReg import COREG
File "C:\Users\PedroVenancio\.conda\envs\arosics\lib\site-packages\arosics\CoReg.py", line 33, in <module>
from osgeo import gdal
File "C:\Users\PedroVenancio\.conda\envs\arosics\lib\site-packages\osgeo\__init__.py", line 37, in <module>
_gdal = swig_import_helper()
File "C:\Users\PedroVenancio\.conda\envs\arosics\lib\site-packages\osgeo\__init__.py", line 33, in swig_import_helper
raise ImportError(traceback_string + '\n' + msg)
ImportError: Traceback (most recent call last):
File "C:\Users\PedroVenancio\.conda\envs\arosics\lib\site-packages\osgeo\__init__.py", line 21, in swig_import_helper
return importlib.import_module(mname)
File "C:\Users\PedroVenancio\.conda\envs\arosics\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 657, in _load_unlocked
File "<frozen importlib._bootstrap>", line 556, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 1166, in create_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: DLL load failed while importing _gdal: Impossível localizar o procedimento especificado.
On Windows, with Python >= 3.8, DLLs are no longer imported from the PATH.
If gdalXXX.dll is in the PATH, then set the USE_PATH_FOR_GDAL_PYTHON=YES environment variable
to feed the PATH into os.add_dll_directory().
Do you have any hint to overcome it?
Thank you very much!
Edited by Daniel Scheffler