python - pip install lxml and gdal failing in anaconda env -


i've had persistent problems trying install frameworks , packages requiring gdal or lxml using pip within anaconda env. i'm running osx 10.8 anaconda-installed python 2.7.5. i've got xcode 4.6.3 command line tools installed.

on packages requiring lxml or gdal (just every gis package) clang errors. these error 1 or error 254. have gdal framework installed , (apparently) functioning qgis (though refers system python , not anaconda distribution). have anaconda- provided lxml, seems working scripting purposes within env. have tried updating lxml, no effect. 2 sample logs included @ end of question. apologies question bit long...

the commonly repeated advice seems to xcode , clt. said, i've done that.

the other idea i've seen on web has c compiler used build anaconda python distribution osx. know absolutely nothing c compilers, know pip installs packages system python without issue. when start system python get:

python 2.7.2 (default, oct 11 2012, 20:14:37)  [gcc 4.2.1 compatible apple clang 4.0 (tags/apple/clang-418.0.60)] on darwin type "help", "copyright", "credits" or "license" more information. 

for anaconda python, get:

python 2.7.5 |anaconda 1.6.1 (x86_64)| (default, jun 28 2013, 22:20:13)  [gcc 4.0.1 (apple inc. build 5493)] on darwin type "help", "copyright", "credits" or "license" more information. 

note difference in gcc version. significant?

most pip failed trying install kartograph.py. after running pip install -r https://raw.github.com/kartograph/kartograph.py/master/requirements.txt within env trouble pretty with

  running setup.py egg_info package lxml     /users/mmoncrief/anaconda/envs/py27/lib/python2.7/distutils/dist.py:267: userwarning: unknown distribution option: 'bugtrack_url'       warnings.warn(msg)     building lxml version 3.2.3.     building without cython.     using build configuration of libxslt 1.1.28     building against libxml2/libxslt in following directory: /users/mmoncrief/anaconda/envs/py27/lib      warning: no previously-included files found matching '*.py'     warning: no files found matching '*.txt' under directory 'src/lxml/tests' downloading/unpacking ordereddict (from -r https://raw.github.com/kartograph/kartograph.py/master/requirements.txt (line 8))   downloading ordereddict-1.1.tar.gz   running setup.py egg_info package ordereddict  downloading/unpacking tinycss (from -r https://raw.github.com/kartograph/kartograph.py/master/requirements.txt (line 9))   downloading tinycss-0.3.tar.gz (72kb): 72kb downloaded   running setup.py egg_info package tinycss     building cython 0.19.1.      no previously-included directories found matching 'docs/_build' downloading/unpacking argparse (from -r https://raw.github.com/kartograph/kartograph.py/master/requirements.txt (line 10))   downloading argparse-1.2.1.tar.gz (69kb): 69kb downloaded   running setup.py egg_info package argparse      warning: no previously-included files matching '*.pyc' found anywhere in distribution     warning: no previously-included files matching '*.pyo' found anywhere in distribution     warning: no previously-included files matching '*.orig' found anywhere in distribution     warning: no previously-included files matching '*.rej' found anywhere in distribution     no previously-included directories found matching 'doc/_build'     no previously-included directories found matching 'env24'     no previously-included directories found matching 'env25'     no previously-included directories found matching 'env26'     no previously-included directories found matching 'env27' requirement satisfied (use --upgrade upgrade): distribute in ./anaconda/envs/py27/lib/python2.7/site-packages (from pykml->-r https://raw.github.com/kartograph/kartograph.py/master/requirements.txt (line 5)) installing collected packages: gdal, lxml, ordereddict, tinycss, argparse   running setup.py install gdal     building 'osgeo._gdal' extension     /usr/bin/clang -fno-strict-aliasing -i/users/mmoncrief/anaconda/envs/py27/include -arch x86_64 -dndebug -g -fwrapv -o3 -wall -wstrict-prototypes -i../../port -i../../gcore -i../../alg -i../../ogr/ -i/users/mmoncrief/anaconda/envs/py27/include/python2.7 -i/users/mmoncrief/anaconda/envs/py27/lib/python2.7/site-packages/numpy/core/include -i/library/frameworks/gdal.framework/versions/1.10/include -c extensions/gdal_wrap.cpp -o build/temp.macosx-10.5-x86_64-2.7/extensions/gdal_wrap.o     extensions/gdal_wrap.cpp:2230:11: warning: explicitly assigning variable of type 'int' [-wself-assign]                         res = swig_addcast(res);                         ~~~ ^              ~~~     extensions/gdal_wrap.cpp:2233:11: warning: explicitly assigning variable of type 'int' [-wself-assign]                         res = swig_addcast(res);                         ~~~ ^              ~~~     extensions/gdal_wrap.cpp:2853:10: fatal error: 'cpl_port.h' file not found     #include "cpl_port.h"              ^     2 warnings , 1 error generated.     error: command '/usr/bin/clang' failed exit status 1     complete output command /users/mmoncrief/anaconda/envs/py27/bin/python -c "import setuptools;__file__='/private/var/folders/l2/zvz4t5rs7pb3n1bc4_bdz6n4cbzgwl/t/pip-build-mmoncrief/gdal/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/l2/zvz4t5rs7pb3n1bc4_bdz6n4cbzgwl/t/pip-jgdz16-record/install-record.txt --single-version-externally-managed:     running install  running build  running build_py  creating build  creating build/lib.macosx-10.5-x86_64-2.7  copying gdal.py -> build/lib.macosx-10.5-x86_64-2.7  copying ogr.py -> build/lib.macosx-10.5-x86_64-2.7  copying osr.py -> build/lib.macosx-10.5-x86_64-2.7  copying gdalconst.py -> build/lib.macosx-10.5-x86_64-2.7  copying gdalnumeric.py -> build/lib.macosx-10.5-x86_64-2.7  creating build/lib.macosx-10.5-x86_64-2.7/osgeo  copying osgeo/__init__.py -> build/lib.macosx-10.5-x86_64-2.7/osgeo  copying osgeo/gdal.py -> build/lib.macosx-10.5-x86_64-2.7/osgeo  copying osgeo/gdal_array.py -> build/lib.macosx-10.5-x86_64-2.7/osgeo  copying osgeo/gdalconst.py -> build/lib.macosx-10.5-x86_64-2.7/osgeo  copying osgeo/gdalnumeric.py -> build/lib.macosx-10.5-x86_64-2.7/osgeo  copying osgeo/ogr.py -> build/lib.macosx-10.5-x86_64-2.7/osgeo  copying osgeo/osr.py -> build/lib.macosx-10.5-x86_64-2.7/osgeo  running build_ext  building 'osgeo._gdal' extension  creating build/temp.macosx-10.5-x86_64-2.7  creating build/temp.macosx-10.5-x86_64-2.7/extensions  /usr/bin/clang -fno-strict-aliasing -i/users/mmoncrief/anaconda/envs/py27/include -arch x86_64 -dndebug -g -fwrapv -o3 -wall -wstrict-prototypes -i../../port -i../../gcore -i../../alg -i../../ogr/ -i/users/mmoncrief/anaconda/envs/py27/include/python2.7 -i/users/mmoncrief/anaconda/envs/py27/lib/python2.7/site-packages/numpy/core/include -i/library/frameworks/gdal.framework/versions/1.10/include -c extensions/gdal_wrap.cpp -o build/temp.macosx-10.5-x86_64-2.7/extensions/gdal_wrap.o  extensions/gdal_wrap.cpp:2230:11: warning: explicitly assigning variable of type 'int' [-wself-assign]                      res = swig_addcast(res);                      ~~~ ^              ~~~  extensions/gdal_wrap.cpp:2233:11: warning: explicitly assigning variable of type 'int' [-wself-assign]                      res = swig_addcast(res);                      ~~~ ^              ~~~  extensions/gdal_wrap.cpp:2853:10: fatal error: 'cpl_port.h' file not found  #include "cpl_port.h"           ^  2 warnings , 1 error generated.  error: command '/usr/bin/clang' failed exit status 1  ---------------------------------------- command /users/mmoncrief/anaconda/envs/py27/bin/python -c "import setuptools;__file__='/private/var/folders/l2/zvz4t5rs7pb3n1bc4_bdz6n4cbzgwl/t/pip-build-mmoncrief/gdal/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/l2/zvz4t5rs7pb3n1bc4_bdz6n4cbzgwl/t/pip-jgdz16-record/install-record.txt --single-version-externally-managed failed error code 1 in /private/var/folders/l2/zvz4t5rs7pb3n1bc4_bdz6n4cbzgwl/t/pip-build-mmoncrief/gdal storing complete log in /users/mmoncrief/.pip/pip.log 

i have had clang errors related lxml.etree. you'll see of peppered in code above. also, if try pip install lxml:

downloading/unpacking lxml   running setup.py egg_info package lxml     /users/mmoncrief/anaconda/envs/py27/lib/python2.7/distutils/dist.py:267: userwarning: unknown distribution option: 'bugtrack_url'       warnings.warn(msg)     building lxml version 3.2.3.     building without cython.     using build configuration of libxslt 1.1.28     building against libxml2/libxslt in following directory: /users/mmoncrief/anaconda/envs/py27/lib      warning: no files found matching '*.txt' under directory 'src/lxml/tests' installing collected packages: lxml   running setup.py install lxml     /users/mmoncrief/anaconda/envs/py27/lib/python2.7/distutils/dist.py:267: userwarning: unknown distribution option: 'bugtrack_url'       warnings.warn(msg)     building lxml version 3.2.3.     building without cython.     using build configuration of libxslt 1.1.28     building against libxml2/libxslt in following directory: /users/mmoncrief/anaconda/envs/py27/lib     building 'lxml.etree' extension     /usr/bin/clang -fno-strict-aliasing -i/users/mmoncrief/anaconda/envs/py27/include -arch x86_64 -dndebug -g -fwrapv -o3 -wall -wstrict-prototypes -i/users/mmoncrief/anaconda/envs/py27/include -i/users/mmoncrief/anaconda/envs/py27/include/libxml2 -i/private/var/folders/l2/zvz4t5rs7pb3n1bc4_bdz6n4cbzgwl/t/pip-build-mmoncrief/lxml/src/lxml/includes -i/users/mmoncrief/anaconda/envs/py27/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.5-x86_64-2.7/src/lxml/lxml.etree.o -flat_namespace     clang: warning: argument unused during compilation: '-flat_namespace'     src/lxml/lxml.etree.c:136455:17: warning: enumeration value '__pyx_e_4lxml_5etree_parser_data_invalid' not handled in switch [-wswitch]             switch (__pyx_v_doc_ref->_type) {                     ^     src/lxml/lxml.etree.c:140541:72: warning: incompatible pointer types passing 'struct __pyx_obj_4lxml_5etree__basecontext *' parameter of type 'struct __pyx_obj_4lxml_5etree__xsltcontext *' [-wincompatible-pointer-types]         __pyx_t_1 = ((pyobject *)__pyx_f_4lxml_5etree_12_xsltcontext__copy(((struct __pyx_obj_4lxml_5etree__basecontext *)__pyx_v_self->_context))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 543; __pyx_clineno = __line__; goto __pyx_l9;}                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     src/lxml/lxml.etree.c:138476:138: note: passing argument parameter '__pyx_v_self' here     static struct __pyx_obj_4lxml_5etree__basecontext *__pyx_f_4lxml_5etree_12_xsltcontext__copy(struct __pyx_obj_4lxml_5etree__xsltcontext *__pyx_v_self) {                                                                                                                                              ^     src/lxml/lxml.etree.c:141947:70: warning: incompatible pointer types passing 'struct __pyx_obj_4lxml_5etree__basecontext *' parameter of type 'struct __pyx_obj_4lxml_5etree__xsltcontext *' [-wincompatible-pointer-types]       __pyx_t_1 = ((pyobject *)__pyx_f_4lxml_5etree_12_xsltcontext__copy(((struct __pyx_obj_4lxml_5etree__basecontext *)__pyx_v_stylesheet->_context))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 680; __pyx_clineno = __line__; goto __pyx_l1_error;}                                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     src/lxml/lxml.etree.c:138476:138: note: passing argument parameter '__pyx_v_self' here     static struct __pyx_obj_4lxml_5etree__basecontext *__pyx_f_4lxml_5etree_12_xsltcontext__copy(struct __pyx_obj_4lxml_5etree__xsltcontext *__pyx_v_self) {                                                                                                                                              ^     src/lxml/lxml.etree.c:160878:19: warning: expression result unused [-wunused-value]         pyobject_init(o, t);                       ^     /users/mmoncrief/anaconda/envs/py27/include/python2.7/objimpl.h:164:69: note: expanded macro 'pyobject_init'         ( py_type(op) = (typeobj), _py_newreference((pyobject *)(op)), (op) )                                                                         ^     src/lxml/lxml.etree.c:162691:19: warning: expression result unused [-wunused-value]         pyobject_init(o, t);                       ^     /users/mmoncrief/anaconda/envs/py27/include/python2.7/objimpl.h:164:69: note: expanded macro 'pyobject_init'         ( py_type(op) = (typeobj), _py_newreference((pyobject *)(op)), (op) )                                                                         ^     src/lxml/lxml.etree.c:168247:19: warning: expression result unused [-wunused-value]         pyobject_init(o, t);                       ^     /users/mmoncrief/anaconda/envs/py27/include/python2.7/objimpl.h:164:69: note: expanded macro 'pyobject_init'         ( py_type(op) = (typeobj), _py_newreference((pyobject *)(op)), (op) )                                                                         ^     src/lxml/lxml.etree.c:170913:19: warning: expression result unused [-wunused-value]         pyobject_init(o, t);                       ^     /users/mmoncrief/anaconda/envs/py27/include/python2.7/objimpl.h:164:69: note: expanded macro 'pyobject_init'         ( py_type(op) = (typeobj), _py_newreference((pyobject *)(op)), (op) )                                                                         ^     src/lxml/lxml.etree.c:12774:13: warning: function '__pyx_f_4lxml_5etree_displaynode' not needed , not emitted [-wunneeded-internal-declaration]     static void __pyx_f_4lxml_5etree_displaynode(xmlnode *__pyx_v_c_node, pyobject *__pyx_v_indent) {                 ^     8 warnings generated.     /usr/bin/clang -bundle -undefined dynamic_lookup -l/users/mmoncrief/anaconda/envs/py27/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.5-x86_64-2.7/src/lxml/lxml.etree.o -l/users/mmoncrief/anaconda/envs/py27/lib -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.5-x86_64-2.7/lxml/etree.so     clang: error: unable execute command: segmentation fault: 11     clang: error: linker command failed due signal (use -v see invocation)     error: command '/usr/bin/clang' failed exit status 254     complete output command /users/mmoncrief/anaconda/envs/py27/bin/python -c "import setuptools;__file__='/private/var/folders/l2/zvz4t5rs7pb3n1bc4_bdz6n4cbzgwl/t/pip-build-mmoncrief/lxml/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/l2/zvz4t5rs7pb3n1bc4_bdz6n4cbzgwl/t/pip-gtlqx_-record/install-record.txt --single-version-externally-managed:     /users/mmoncrief/anaconda/envs/py27/lib/python2.7/distutils/dist.py:267: userwarning: unknown distribution option: 'bugtrack_url'    warnings.warn(msg)  building lxml version 3.2.3.  building without cython.  using build configuration of libxslt 1.1.28  building against libxml2/libxslt in following directory: /users/mmoncrief/anaconda/envs/py27/lib  running install  running build  running build_py  creating build  creating build/lib.macosx-10.5-x86_64-2.7  creating build/lib.macosx-10.5-x86_64-2.7/lxml  copying src/lxml/__init__.py -> build/lib.macosx-10.5-x86_64-2.7/lxml  copying src/lxml/_elementpath.py -> build/lib.macosx-10.5-x86_64-2.7/lxml  copying src/lxml/builder.py -> build/lib.macosx-10.5-x86_64-2.7/lxml  copying src/lxml/cssselect.py -> build/lib.macosx-10.5-x86_64-2.7/lxml  copying src/lxml/doctestcompare.py -> build/lib.macosx-10.5-x86_64-2.7/lxml  copying src/lxml/elementinclude.py -> build/lib.macosx-10.5-x86_64-2.7/lxml  copying src/lxml/pyclasslookup.py -> build/lib.macosx-10.5-x86_64-2.7/lxml  copying src/lxml/sax.py -> build/lib.macosx-10.5-x86_64-2.7/lxml  copying src/lxml/usedoctest.py -> build/lib.macosx-10.5-x86_64-2.7/lxml  creating build/lib.macosx-10.5-x86_64-2.7/lxml/includes  copying src/lxml/includes/__init__.py -> build/lib.macosx-10.5-x86_64-2.7/lxml/includes  creating build/lib.macosx-10.5-x86_64-2.7/lxml/html  copying src/lxml/html/__init__.py -> build/lib.macosx-10.5-x86_64-2.7/lxml/html  copying src/lxml/html/_diffcommand.py -> build/lib.macosx-10.5-x86_64-2.7/lxml/html  copying src/lxml/html/_html5builder.py -> build/lib.macosx-10.5-x86_64-2.7/lxml/html  copying src/lxml/html/_setmixin.py -> build/lib.macosx-10.5-x86_64-2.7/lxml/html  copying src/lxml/html/builder.py -> build/lib.macosx-10.5-x86_64-2.7/lxml/html  copying src/lxml/html/clean.py -> build/lib.macosx-10.5-x86_64-2.7/lxml/html  copying src/lxml/html/defs.py -> build/lib.macosx-10.5-x86_64-2.7/lxml/html  copying src/lxml/html/diff.py -> build/lib.macosx-10.5-x86_64-2.7/lxml/html  copying src/lxml/html/elementsoup.py -> build/lib.macosx-10.5-x86_64-2.7/lxml/html  copying src/lxml/html/formfill.py -> build/lib.macosx-10.5-x86_64-2.7/lxml/html  copying src/lxml/html/html5parser.py -> build/lib.macosx-10.5-x86_64-2.7/lxml/html  copying src/lxml/html/soupparser.py -> build/lib.macosx-10.5-x86_64-2.7/lxml/html  copying src/lxml/html/usedoctest.py -> build/lib.macosx-10.5-x86_64-2.7/lxml/html  creating build/lib.macosx-10.5-x86_64-2.7/lxml/isoschematron  copying src/lxml/isoschematron/__init__.py -> build/lib.macosx-10.5-x86_64-2.7/lxml/isoschematron  copying src/lxml/lxml.etree.h -> build/lib.macosx-10.5-x86_64-2.7/lxml  copying src/lxml/lxml.etree_api.h -> build/lib.macosx-10.5-x86_64-2.7/lxml  copying src/lxml/includes/c14n.pxd -> build/lib.macosx-10.5-x86_64-2.7/lxml/includes  copying src/lxml/includes/config.pxd -> build/lib.macosx-10.5-x86_64-2.7/lxml/includes  copying src/lxml/includes/dtdvalid.pxd -> build/lib.macosx-10.5-x86_64-2.7/lxml/includes  copying src/lxml/includes/etreepublic.pxd -> build/lib.macosx-10.5-x86_64-2.7/lxml/includes  copying src/lxml/includes/htmlparser.pxd -> build/lib.macosx-10.5-x86_64-2.7/lxml/includes  copying src/lxml/includes/relaxng.pxd -> build/lib.macosx-10.5-x86_64-2.7/lxml/includes  copying src/lxml/includes/schematron.pxd -> build/lib.macosx-10.5-x86_64-2.7/lxml/includes  copying src/lxml/includes/tree.pxd -> build/lib.macosx-10.5-x86_64-2.7/lxml/includes  copying src/lxml/includes/uri.pxd -> build/lib.macosx-10.5-x86_64-2.7/lxml/includes  copying src/lxml/includes/xinclude.pxd -> build/lib.macosx-10.5-x86_64-2.7/lxml/includes  copying src/lxml/includes/xmlerror.pxd -> build/lib.macosx-10.5-x86_64-2.7/lxml/includes  copying src/lxml/includes/xmlparser.pxd -> build/lib.macosx-10.5-x86_64-2.7/lxml/includes  copying src/lxml/includes/xmlschema.pxd -> build/lib.macosx-10.5-x86_64-2.7/lxml/includes  copying src/lxml/includes/xpath.pxd -> build/lib.macosx-10.5-x86_64-2.7/lxml/includes  copying src/lxml/includes/xslt.pxd -> build/lib.macosx-10.5-x86_64-2.7/lxml/includes  copying src/lxml/includes/etree_defs.h -> build/lib.macosx-10.5-x86_64-2.7/lxml/includes  copying src/lxml/includes/lxml-version.h -> build/lib.macosx-10.5-x86_64-2.7/lxml/includes  creating build/lib.macosx-10.5-x86_64-2.7/lxml/isoschematron/resources  creating build/lib.macosx-10.5-x86_64-2.7/lxml/isoschematron/resources/rng  copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.macosx-10.5-x86_64-2.7/lxml/isoschematron/resources/rng  creating build/lib.macosx-10.5-x86_64-2.7/lxml/isoschematron/resources/xsl  copying src/lxml/isoschematron/resources/xsl/rng2schtrn.xsl -> build/lib.macosx-10.5-x86_64-2.7/lxml/isoschematron/resources/xsl  copying src/lxml/isoschematron/resources/xsl/xsd2schtrn.xsl -> build/lib.macosx-10.5-x86_64-2.7/lxml/isoschematron/resources/xsl  creating build/lib.macosx-10.5-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.macosx-10.5-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.macosx-10.5-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.macosx-10.5-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.macosx-10.5-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.macosx-10.5-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.macosx-10.5-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1  running build_ext  building 'lxml.etree' extension  creating build/temp.macosx-10.5-x86_64-2.7  creating build/temp.macosx-10.5-x86_64-2.7/src  creating build/temp.macosx-10.5-x86_64-2.7/src/lxml  /usr/bin/clang -fno-strict-aliasing -i/users/mmoncrief/anaconda/envs/py27/include -arch x86_64 -dndebug -g -fwrapv -o3 -wall -wstrict-prototypes -i/users/mmoncrief/anaconda/envs/py27/include -i/users/mmoncrief/anaconda/envs/py27/include/libxml2 -i/private/var/folders/l2/zvz4t5rs7pb3n1bc4_bdz6n4cbzgwl/t/pip-build-mmoncrief/lxml/src/lxml/includes -i/users/mmoncrief/anaconda/envs/py27/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.5-x86_64-2.7/src/lxml/lxml.etree.o -flat_namespace  clang: warning: argument unused during compilation: '-flat_namespace'  src/lxml/lxml.etree.c:136455:17: warning: enumeration value '__pyx_e_4lxml_5etree_parser_data_invalid' not handled in switch [-wswitch]          switch (__pyx_v_doc_ref->_type) {                  ^  src/lxml/lxml.etree.c:140541:72: warning: incompatible pointer types passing 'struct __pyx_obj_4lxml_5etree__basecontext *' parameter of type 'struct __pyx_obj_4lxml_5etree__xsltcontext *' [-wincompatible-pointer-types]      __pyx_t_1 = ((pyobject *)__pyx_f_4lxml_5etree_12_xsltcontext__copy(((struct __pyx_obj_4lxml_5etree__basecontext *)__pyx_v_self->_context))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 543; __pyx_clineno = __line__; goto __pyx_l9;}                                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  src/lxml/lxml.etree.c:138476:138: note: passing argument parameter '__pyx_v_self' here  static struct __pyx_obj_4lxml_5etree__basecontext *__pyx_f_4lxml_5etree_12_xsltcontext__copy(struct __pyx_obj_4lxml_5etree__xsltcontext *__pyx_v_self) {                                                                                                                                           ^  src/lxml/lxml.etree.c:141947:70: warning: incompatible pointer types passing 'struct __pyx_obj_4lxml_5etree__basecontext *' parameter of type 'struct __pyx_obj_4lxml_5etree__xsltcontext *' [-wincompatible-pointer-types]    __pyx_t_1 = ((pyobject *)__pyx_f_4lxml_5etree_12_xsltcontext__copy(((struct __pyx_obj_4lxml_5etree__basecontext *)__pyx_v_stylesheet->_context))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 680; __pyx_clineno = __line__; goto __pyx_l1_error;}                                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  src/lxml/lxml.etree.c:138476:138: note: passing argument parameter '__pyx_v_self' here  static struct __pyx_obj_4lxml_5etree__basecontext *__pyx_f_4lxml_5etree_12_xsltcontext__copy(struct __pyx_obj_4lxml_5etree__xsltcontext *__pyx_v_self) {                                                                                                                                           ^  src/lxml/lxml.etree.c:160878:19: warning: expression result unused [-wunused-value]      pyobject_init(o, t);                    ^  /users/mmoncrief/anaconda/envs/py27/include/python2.7/objimpl.h:164:69: note: expanded macro 'pyobject_init'      ( py_type(op) = (typeobj), _py_newreference((pyobject *)(op)), (op) )                                                                      ^  src/lxml/lxml.etree.c:162691:19: warning: expression result unused [-wunused-value]      pyobject_init(o, t);                    ^  /users/mmoncrief/anaconda/envs/py27/include/python2.7/objimpl.h:164:69: note: expanded macro 'pyobject_init'      ( py_type(op) = (typeobj), _py_newreference((pyobject *)(op)), (op) )                                                                      ^  src/lxml/lxml.etree.c:168247:19: warning: expression result unused [-wunused-value]      pyobject_init(o, t);                    ^  /users/mmoncrief/anaconda/envs/py27/include/python2.7/objimpl.h:164:69: note: expanded macro 'pyobject_init'      ( py_type(op) = (typeobj), _py_newreference((pyobject *)(op)), (op) )                                                                      ^  src/lxml/lxml.etree.c:170913:19: warning: expression result unused [-wunused-value]      pyobject_init(o, t);                    ^  /users/mmoncrief/anaconda/envs/py27/include/python2.7/objimpl.h:164:69: note: expanded macro 'pyobject_init'      ( py_type(op) = (typeobj), _py_newreference((pyobject *)(op)), (op) )                                                                      ^  src/lxml/lxml.etree.c:12774:13: warning: function '__pyx_f_4lxml_5etree_displaynode' not needed , not emitted [-wunneeded-internal-declaration]  static void __pyx_f_4lxml_5etree_displaynode(xmlnode *__pyx_v_c_node, pyobject *__pyx_v_indent) {              ^  8 warnings generated.  /usr/bin/clang -bundle -undefined dynamic_lookup -l/users/mmoncrief/anaconda/envs/py27/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.5-x86_64-2.7/src/lxml/lxml.etree.o -l/users/mmoncrief/anaconda/envs/py27/lib -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.5-x86_64-2.7/lxml/etree.so  clang: error: unable execute command: segmentation fault: 11  clang: error: linker command failed due signal (use -v see invocation)  error: command '/usr/bin/clang' failed exit status 254  ---------------------------------------- command /users/mmoncrief/anaconda/envs/py27/bin/python -c "import setuptools;__file__='/private/var/folders/l2/zvz4t5rs7pb3n1bc4_bdz6n4cbzgwl/t/pip-build-mmoncrief/lxml/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/l2/zvz4t5rs7pb3n1bc4_bdz6n4cbzgwl/t/pip-gtlqx_-record/install-record.txt --single-version-externally-managed failed error code 1 in /private/var/folders/l2/zvz4t5rs7pb3n1bc4_bdz6n4cbzgwl/t/pip-build-mmoncrief/lxml storing complete log in /users/mmoncrief/.pip/pip.log 

help appreciated. i've been working in anaconda other applications , stay distribution.

here $0.02, in experience lxml installs on os x have caused problems because of libmxl2 , libxslt dependencies. specific issue here 'cpl_port.h' not being found suggesting don't have headers gdal on system, similar issue 1 i've encountered lxml. found stackexchange post gdal package missing addresses building , installing gdal specific error using pip , virtual ubuntu machine, idea same. pip tool need told explicitly find headers gdal.

in general issue os x puts headers in non standard places *nix system, , quite dependencies several revision behind version used development of packages trying install. can use macports or similar piggyback on os x creating structure similar linux dependencies more current versions of libraries, virtualization getting , few production systems running os x feel there far simpler solution. 15+ year apple user when comes python development on mac suggestion use kind of virtualization tool, vagrant virtualbox. unless going put python code production on os x or os x server better develop on final production os know during development dependency versions available , environment specific effects present. plus other os easier install packages lxml , gdal on os x, simple "sudo apt-get install -y --fix-missing" on debian variants can missing dependency , move along. vagrant sync source files host guest can use rich client ide without fuss.


Comments

Popular posts from this blog

c++ - Linked List error when inserting for the last time -

java - activate/deactivate sonar maven plugin by profile? -

java - What is the difference between String. and String.this. ? -