-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GDAL 1.6 & Mac #2
Comments
On MacOS 10.6.8, I just made a no-site-packages virtualenv, executed "pip install englewood", and was able to import gdal and do some minor stuff that makes me think that you're running into a different issue. Are you using virtualenv? if not, the problem may be a collision between GDAL 1.6 and some other libraries you have installed. Compiling C libraries on Mac can be a headache, so I won't claim to be certain that I can explain further, but in short, it seems to work for me. |
I had the same problem using virtualenv. What libraries could cause collisions? |
when you used virtualenv, did you specify "--no-site-packages", or are you using virtualenv 1.7 or newer, where that's the default? If not, you could still be having collision issues. It's hard to say what could be causing collisions, especially since I'm far from expert in building C libraries and managing their interactions. If you did use --no-site-packages, I'm at a loss to speculate why what worked for me isn't working for you with the same version of Mac OS. |
I tried that, and I see that when i set that up, I get a message that "--no-site-packages" is the default. Here is the output when I try "pip install englewood" Requirement already satisfied (use --upgrade to upgrade): englewood in ./lib/python2.7/site-packages
Installing collected packages: GDAL running build running build_py running build_ext Could not run gdal-config!!!! building 'osgeo._gdal' extension gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3 -I../../port -I../../gcore -I../../alg -I../../ogr/ -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -c extensions/gdal_wrap.cpp -o build/temp.macosx-10.6-intel-2.7/extensions/gdal_wrap.o unable to execute gcc-4.2: No such file or directory error: command 'gcc-4.2' failed with exit status 1 Command /Users/georgia/Documents/SIDL/Zeega/dotdensity/virtualenv2/bin/python -c "import setuptools;file='/Users/georgia/Documents/SIDL/Zeega/dotdensity/virtualenv2/build/GDAL/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --single-version-externally-managed --record /var/folders/p3/fcv_b6c51r17yz6664cby7zw0000gn/T/pip-BFCU1X-record/install-record.txt --install-headers /Users/georgia/Documents/SIDL/Zeega/dotdensity/virtualenv2/bin/../include/site/python2.7 failed with error code 1 in /Users/georgia/Documents/SIDL/Zeega/dotdensity/virtualenv2/build/GDAL |
On Apr 24, 2012, at 3:03 PM, georgiamoon wrote:
This is the critical part: the problem isn't specific to GDAL; rather (I'm inferring), GDAL is the first python library you've tried to install which has C bindings, and your system isn't configured to compile C code. This is a common problem for Mac users getting started with python, and once we solve it, we often forget we ever did, so it can take a minute to work out the symptoms. This has gotten a lot easier, also. See http://kennethreitz.com/xcode-gcc-and-homebrew.html and particularly the section about "Command Line Tools for Xcode" Give that a shot... |
OK. Uninstalled XCode, used only command line tools, and GCC installer, and this is now the output: Requirement already satisfied (use --upgrade to upgrade): englewood in ./lib/python2.7/site-packages
Installing collected packages: GDAL running build running build_py running build_ext Could not run gdal-config!!!! building 'osgeo._gdal' extension gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3 -I../../port -I../../gcore -I../../alg -I../../ogr/ -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -c extensions/gdal_wrap.cpp -o build/temp.macosx-10.6-intel-2.7/extensions/gdal_wrap.o extensions/gdal_wrap.cpp:2587:22: error: cpl_port.h: No such file or directory extensions/gdal_wrap.cpp:2588:24: error: cpl_string.h: No such file or directory extensions/gdal_wrap.cpp:2590:18: error: gdal.h: No such file or directory extensions/gdal_wrap.cpp:2591:23: error: gdal_priv.h: No such file or directory extensions/gdal_wrap.cpp:2592:22: error: gdal_alg.h: No such file or directory extensions/gdal_wrap.cpp:2593:24: error: gdalwarper.h: No such file or directory extensions/gdal_wrap.cpp: In function ‘void SWIG_Python_AddErrorMsg(const char*)’: extensions/gdal_wrap.cpp:870: warning: format not a string literal and no format arguments extensions/gdal_wrap.cpp: At global scope: extensions/gdal_wrap.cpp:2610: error: expected initializer before ‘VeryQuietErrorHandler’ extensions/gdal_wrap.cpp:2587:22: error: cpl_port.h: No such file or directory extensions/gdal_wrap.cpp:2588:24: error: cpl_string.h: No such file or directory extensions/gdal_wrap.cpp:2590:18: error: gdal.h: No such file or directory extensions/gdal_wrap.cpp:2591:23: error: gdal_priv.h: No such file or directory extensions/gdal_wrap.cpp:2592:22: error: gdal_alg.h: No such file or directory extensions/gdal_wrap.cpp:2593:24: error: gdalwarper.h: No such file or directory extensions/gdal_wrap.cpp: In function ‘void SWIG_Python_AddErrorMsg(const char*)’: extensions/gdal_wrap.cpp:870: warning: format not a string literal and no format arguments extensions/gdal_wrap.cpp: At global scope: extensions/gdal_wrap.cpp:2610: error: expected initializer before ‘VeryQuietErrorHandler’ lipo: can't figure out the architecture type of: /var/folders/p3/fcv_b6c51r17yz6664cby7zw0000gn/T//ccLkCJz7.out error: command 'gcc-4.2' failed with exit status 1 Command /Users/georgia/Documents/SIDL/Zeega/dotdensity/virtualenv2/bin/python -c "import setuptools;file='/Users/georgia/Documents/SIDL/Zeega/dotdensity/virtualenv2/build/GDAL/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --single-version-externally-managed --record /var/folders/p3/fcv_b6c51r17yz6664cby7zw0000gn/T/pip-Ppgrs9-record/install-record.txt --install-headers /Users/georgia/Documents/SIDL/Zeega/dotdensity/virtualenv2/bin/../include/site/python2.7 failed with error code 1 in /Users/georgia/Documents/SIDL/Zeega/dotdensity/virtualenv2/build/GDAL |
I just had this issue will trying a
|
Having some luck following the GDAL installation here. http://ubuntuforums.org/showthread.php?t=1769445 |
I'm having the same issue as @georgiamoon trying to install englewood on OSX Mavericks. I use macports to install all my other ports (including python), so I am sure that it is not related to not having X Tools command line tools installed, as @JoeGermuska wrote. I get precisely the same error and similar output as the one @georgiamoon posted. |
Yeah, I realize now that I totally misread that error trace. Hard to advise on C library compilation. I know in the past I've solved compilation problems by setting environment variables in |
I managed to run the scripts by cloning the repository, but |
I'm using a Mac running 10.6.8. I think that I've found that the "pip install englewood" won't work because it comes with GDAL 1.6, which apparently doesn't work on a Mac.
I'm currently trying to run the scripts having just downloaded the code form github and install GDAL 1.9 and Num.py.
It'd be great to update what GDAL comes with Englewood so that the install works on a Mac!
Thanks.
The text was updated successfully, but these errors were encountered: