GitHubRGI / geopackage-python

Achived - See GitLab repository for current development
https://gitlab.com/GitLabRGI/erdc/geopackage-python
GNU General Public License v3.0
65 stars 42 forks source link

ImportError: No module named gdal #23

Closed grl-sage closed 8 years ago

grl-sage commented 8 years ago

Installed the following in the order below

python v2.7.11 from https://www.python.org/downloads/ gdal-111-1800-x64-core.msi gdal-111-1800-x64-mrsid.msi GDAL-1.11.3.win-amd64-py2.7.msi

Tried to tile up some data but got message below.

Traceback (most recent call last): File "gdal2tiles_parallel.py", line 66, in import gdal ImportError: No module named gdal

stevendlander commented 8 years ago

This error occurs on Windows when you try to run the script in the CMD shell without the loaded GDAL extensions. In the start menu, the GDAL folder has a special shell shortcut called GDAL 111 (MSVC 2013 Win64) Command Prompt or something similar.

Launch that command prompt and then try to run gdal2tiles_parallel.py and it should work.

grl-sage commented 8 years ago

Same Error using the GDAL shell.


From: Steven D. Lander [notifications@github.com] Sent: Tuesday, February 09, 2016 9:23 AM To: GitHubRGI/geopackage-python Cc: Catania, Luke A ERDC-RDE-GRL-VA CIV Subject: Re: [geopackage-python] ImportError: No module named gdal (#23)

This error occurs on Windows when you try to run the script in the CMD shell without the loaded GDAL extensions. In the start menu, the GDAL folder has a special shell shortcut called GDAL 111 (MSVC 2013 Win64) Command Prompt or something similar.

Launch that command prompt and then try to run gdal2tiles_parallel.py and it should work.

— Reply to this email directly or view it on GitHubhttps://webmail.erdc.dren.mil/owa/UrlBlockedError.aspx.

grl-sage commented 8 years ago

I noticed the environment variable set in the command window, but I do not have this directory. PYTHONPATH=C:\Program Files\GDAL\python


From: Steven D. Lander [notifications@github.com] Sent: Tuesday, February 09, 2016 9:23 AM To: GitHubRGI/geopackage-python Cc: Catania, Luke A ERDC-RDE-GRL-VA CIV Subject: Re: [geopackage-python] ImportError: No module named gdal (#23)

This error occurs on Windows when you try to run the script in the CMD shell without the loaded GDAL extensions. In the start menu, the GDAL folder has a special shell shortcut called GDAL 111 (MSVC 2013 Win64) Command Prompt or something similar.

Launch that command prompt and then try to run gdal2tiles_parallel.py and it should work.

— Reply to this email directly or view it on GitHubhttps://webmail.erdc.dren.mil/owa/UrlBlockedError.aspx.

grl-sage commented 8 years ago

After removing some windows registry entry editing due to another python install that had remaining paths in the registry, I tried another install and get the message.

Traceback (most recent call last): File "gdal2tiles_parallel.py", line 2498, in main(None) File "gdal2tiles_parallel.py", line 2450, in main gdal2tiles = GDAL2Tiles( argv[1:] ) # handle command line options File "gdal2tiles_parallel.py", line 704, in init self.optparse_init() File "gdal2tiles_parallel.py", line 815, in optparse_init p = OptionParser(usage, version="%prog "+ version) NameError: global name 'version' is not defined

This is without MrSid install. With MrSid get additional error message. I looked in windows explorer and the dll is there.

ERROR 1: Can't load requested DLL: C:\Program Files\GDAL\gdalplugins\gdal_MrSID.dll 126: The specified module could not be found.

ERROR 1: Can't load requested DLL: C:\Program Files\GDAL\gdalplugins\gdal_MrSID.dll 126: The specified module could not be found.

stevendlander commented 8 years ago

Looks like some refactoring work that was meant for a different branch was put into master instead. I have reverted gdal2tiles_parallel.py to the previous version and tested, so it should be working now if you pull down the changes. Would you mind trying that?

grl-sage commented 8 years ago

OK. I will look at it in the morning.

stevendlander commented 8 years ago

Marking this as closed. Feel free to re-open if this is still an issue.