正在运行setup.py bdist_wheel for GDAL ...错误

时间:2018-07-20 03:07:31

标签: python gdal

我正在尝试在虚拟环境中执行此命令pip install requirements.txtGDAL==2.0.0在m requirements.txt中列出。

  

(genv)esm @ ubuntuOnly:〜/ geonode $ pip install -r requirements.txt

随着构建的进行,我得到了一个错误。  以下是错误的详细信息。有人可以帮我吗?非常感谢您的回答。

Building wheels for collected packages: GDAL, pycurl
  Running setup.py bdist_wheel for GDAL ... error
  Complete output from command /home/esm/genv/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-buUQgn/GDAL/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-WhDYfU --python-tag cp27:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-2.7
  copying gdal.py -> build/lib.linux-x86_64-2.7
  copying ogr.py -> build/lib.linux-x86_64-2.7
  copying osr.py -> build/lib.linux-x86_64-2.7
  copying gdalconst.py -> build/lib.linux-x86_64-2.7
  copying gdalnumeric.py -> build/lib.linux-x86_64-2.7
  creating build/lib.linux-x86_64-2.7/osgeo
  copying osgeo/gdalnumeric.py -> build/lib.linux-x86_64-2.7/osgeo
  copying osgeo/osr.py -> build/lib.linux-x86_64-2.7/osgeo
  copying osgeo/__init__.py -> build/lib.linux-x86_64-2.7/osgeo
  copying osgeo/gdal.py -> build/lib.linux-x86_64-2.7/osgeo
  copying osgeo/gdalconst.py -> build/lib.linux-x86_64-2.7/osgeo
  copying osgeo/gdal_array.py -> build/lib.linux-x86_64-2.7/osgeo
  copying osgeo/ogr.py -> build/lib.linux-x86_64-2.7/osgeo
  running build_ext
  building 'osgeo._gdal' extension
  creating build/temp.linux-x86_64-2.7
  creating build/temp.linux-x86_64-2.7/extensions
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I/usr/include/python2.7 -I/home/esm/genv/local/lib/python2.7/site-packages/numpy/core/include -I/usr/include -c extensions/gdal_wrap.cpp -o build/temp.linux-x86_64-2.7/extensions/gdal_wrap.o
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  extensions/gdal_wrap.cpp:2859:22: fatal error: cpl_port.h: No such file or directory
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for GDAL
  Running setup.py clean for GDAL
  Running setup.py bdist_wheel for pycurl ... error
  Complete output from command /home/esm/genv/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-buUQgn/pycurl/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-kaCnJx --python-tag cp27:
  Using curl-config (libcurl 7.47.0)
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-2.7
  creating build/lib.linux-x86_64-2.7/curl
  copying python/curl/__init__.py -> build/lib.linux-x86_64-2.7/curl
  running build_ext
  building 'pycurl' extension
  creating build/temp.linux-x86_64-2.7
  creating build/temp.linux-x86_64-2.7/src
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DPYCURL_VERSION="7.43.0" -DHAVE_CURL_GNUTLS=1 -DHAVE_CURL_SSL=1 -I/usr/include/python2.7 -c src/docstrings.c -o build/temp.linux-x86_64-2.7/src/docstrings.o
  In file included from src/docstrings.c:4:0:
  src/pycurl.h:173:30: fatal error: gnutls/gnutls.h: No such file or directory
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for pycurl
  Running setup.py clean for pycurl
Failed to build GDAL pycurl
pinax-theme-bootstrap-account 1.0b2 has requirement django-appconf==0.5, but you'll have django-appconf 1.0.2 which is incompatible.
pyelasticsearch 1.4 has requirement elasticsearch<2.0.0,>=1.3.0, but you'll have elasticsearch 6.0.0 which is incompatible.
pycsw 2.0.3 has requirement lxml==3.6.2, but you'll have lxml 4.1.1 which is incompatible.
pycsw 2.0.3 has requirement OWSLib==0.10.3, but you'll have owslib 0.16.0 which is incompatible.
pycsw 2.0.3 has requirement pyproj==1.9.3, but you'll have pyproj 1.9.5.1 which is incompatible.
pycsw 2.0.3 has requirement Shapely==1.3.1, but you'll have shapely 1.5.17 which is incompatible.
Installing collected packages: GDAL, geolinks, geonode-agon-ratings, geonode-announcements, geonode-arcrest, geonode-avatar, geonode-dialogos, geonode-notification, geonode-user-accounts, geonode-user-messages, gisdata, httplib2, gsconfig, gsimporter, lxml, MultipartPostHandler, numpy, pyproj, OWSLib, pyasn1, PyNaCl, paramiko, Paste, PasteDeploy, Paver, pep8, pinax-theme-bootstrap, pinax-theme-bootstrap-account, psycopg2, Shapely, xmltodict, pycsw, pycurl, simplejson, pyelasticsearch, pyOpenSSL, python-openid, PyYAML, scgi, sqlparse, Tempita, transifex-client, virtualenv
  Running setup.py install for GDAL ... error
    Complete output from command /home/esm/genv/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-buUQgn/GDAL/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-cCivnG/install-record.txt --single-version-externally-managed --compile --install-headers /home/esm/genv/include/site/python2.7/GDAL:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-2.7
    copying gdal.py -> build/lib.linux-x86_64-2.7
    copying ogr.py -> build/lib.linux-x86_64-2.7
    copying osr.py -> build/lib.linux-x86_64-2.7
    copying gdalconst.py -> build/lib.linux-x86_64-2.7
    copying gdalnumeric.py -> build/lib.linux-x86_64-2.7
    creating build/lib.linux-x86_64-2.7/osgeo
    copying osgeo/gdalnumeric.py -> build/lib.linux-x86_64-2.7/osgeo
    copying osgeo/osr.py -> build/lib.linux-x86_64-2.7/osgeo
    copying osgeo/__init__.py -> build/lib.linux-x86_64-2.7/osgeo
    copying osgeo/gdal.py -> build/lib.linux-x86_64-2.7/osgeo
    copying osgeo/gdalconst.py -> build/lib.linux-x86_64-2.7/osgeo
    copying osgeo/gdal_array.py -> build/lib.linux-x86_64-2.7/osgeo
    copying osgeo/ogr.py -> build/lib.linux-x86_64-2.7/osgeo
    running build_ext
    building 'osgeo._gdal' extension
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/extensions
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I/usr/include/python2.7 -I/home/esm/genv/local/lib/python2.7/site-packages/numpy/core/include -I/usr/include -c extensions/gdal_wrap.cpp -o build/temp.linux-x86_64-2.7/extensions/gdal_wrap.o
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    extensions/gdal_wrap.cpp:2859:22: fatal error: cpl_port.h: No such file or directory
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    ----------------------------------------
Command "/home/esm/genv/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-buUQgn/GDAL/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-cCivnG/install-record.txt --single-version-externally-managed --compile --install-headers /home/esm/genv/include/site/python2.7/GDAL" failed with error code 1 in /tmp/pip-install-buUQgn/GDAL/

0 个答案:

没有答案
相关问题