简体   繁体   中英

Anaconda “import georaster” error: specified module not found

I am using Anaconda3 5.2.0 for Windows 10 64 bit, which is python 3.6.5 (Anaconda3-5.2.0-Windows-x86_64.exe). I have installed this into C:\\Anaconda3 and then from the anaconda prompt installed basemap:

conda install -c conda-forge basemap
conda install -c conda-forge basemap-data-files

I have used this to start building map files and everything is working fine. I then wanted to add a raster to the map using georaster.

conda install -c conda-forge georaster

This also installs gdal.

When I open Jupyter Notebook and enter the line

import georaster

I get the following error message:

ImportError: DLL load failed: The specified module could not be found.

I have tried various solutions that I have seen for related issues including installing a gdal update, fiona, and geopandas. None of these change the message.

I tried installing gdal using the binaries .whl file in conda, but despite following the advice (which said to use pip) I was not able to make it work.

pip install GDAL-2.2.4-cp37-cp37m-win_amd64.whl

resulted in an error message:

GDAL-2.2.4-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform.

Finally I went looking to see if I could locate the missing DLL manually. I saw one user suggest libtiff.dll was the missing file, and indeed it was one I did not have. I downloaded it and copied it into the System32 and SysWOW64 folders. This still resulted in an error but changed the error message:

ImportError: DLL load failed: %1 is not a valid Win32 application.

However I could not find a way to stop the error from occurring. I followed the steps to register the .dll but that also had an error message from not found to not supported:

(cmd prompt in administrator mode)

regsvr32.exe /i libtiff.dll

The module "libtiff.dll" failed to load.

Make sure the binary is stored at the specified path or debug it to check for problems with the binary or dependent .DLL files.

The specified module could not be found.

I have tried downloading from 2 other websites, neither with any success. It is feeling like every method I attempt now just hits some weird error that nobody else is seeming to have and I don't understand why.

If anyone could offer some advice I'd be very appreciative. Thank you in advance.

downloading the required *.whl file(GDAL-2.2.4-cp36-cp36m-win_amd64.whl) from https://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal and then copying it to a location like C:\\GDAL-2.2.4-cp36-cp36m-win_amd64.whl

then pip install c:\\GDAL-2.2.4-cp36-cp36m-win_amd64.whl

worked for me.

Thanks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM