gdal / osx
I'm struggling to get this up and running in a virtualenv! It's entirely due to GDAL not installing on a mac using this line:
pip install GDAL
Could this be omitted with GDAL just listed as a required package? I do have GDAL (although an older version) which I installed using the kyngchaos installer: http://www.kyngchaos.com/software/frameworks#gdal_complete
Error message for the curious:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/Users/djq/Envs/raster/build/GDAL/setup.py", line 301, in <module>
**extra )
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup
dist.run_commands()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "<string>", line 15, in replacement_run
File "/Users/djq/Envs/raster/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 186, in find_sources
mm.run()
File "/Users/djq/Envs/raster/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 246, in run
self.add_defaults()
File "/Users/djq/Envs/raster/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 282, in add_defaults
sdist.add_defaults(self)
File "/Users/djq/Envs/raster/lib/python2.7/site-packages/setuptools/command/sdist.py", line 179, in add_defaults
build_ext = self.get_finalized_command('build_ext')
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 312, in get_finalized_command
cmd_obj.ensure_finalized()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
self.finalize_options()
File "/Users/djq/Envs/raster/build/GDAL/setup.py", line 196, in finalize_options
self.gdaldir = self.get_gdal_config('prefix')
File "/Users/djq/Envs/raster/build/GDAL/setup.py", line 176, in get_gdal_config
return fetch_config(option)
File "/Users/djq/Envs/raster/build/GDAL/setup.py", line 129, in fetch_config
raise gdal_config_error, e""")
File "<string>", line 4, in <module>
__main__.gdal_config_error: [Errno 2] No such file or directory
----------------------------------------
I thought about that before, as the GDAL install can be tricky, specially in virtualenvs and osx. So maybe I'll just remove the direct dependencies for the installer.
Here is a link to a discussion that might have some answers (I wrote the last anwser there, I managed to install gdal into a virtualenv by pointing the pip installer to the gdal binaries that come from kyngchaos).
http://gis.stackexchange.com/questions/6360/
Another option, if you just add the global python-gdal package to your python path in the virtualenv, is to simply ignore dependencies when installing the package
pip install --no-deps django-raster
Thanks, pip install --no-deps django-raster worked!