" python setup.py egg_info" netCDF4的错误代码1失败

时间:2016-03-10 18:10:44

标签: python setup.py

在我的家庭办公室

我使用Ubuntu 12.04。现在我尝试用netcdf4配置python。我安装了很多软件包,如numpy,pandas,matplotlib,hdf5,cython,h5py,...当我尝试安装netcdf4时,我收到了错误消息:

 Collecting netcdf
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages    /urllib3/util/ssl_.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading netcdf-0.2.1.tar.gz (16.5MB)
100% |████████████████████████████████| 16.5MB 42kB/s 
Requirement already satisfied (use --upgrade to upgrade): numpy==1.8.0 in /usr/local/lib/python2.7/dist-packages/numpy-1.8.0-py2.7-linux-x86_64.egg (from netcdf)
Collecting h5py==2.3.1 (from netcdf)
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading h5py-2.3.1.tar.gz (1.1MB)
100% |████████████████████████████████| 1.1MB 223kB/s 
Collecting netCDF4==1.1.0 (from netcdf)
  Downloading netCDF4-1.1.0.tar.gz (562kB)
100% |████████████████████████████████| 563kB 340kB/s 
Complete output from command python setup.py egg_info:

HDF5_DIR environment variable not set, checking some standard locations ..
checking /home/elly ...
checking /usr/local ...
HDF5 found in /usr/local

NETCDF4_DIR environment variable not set, checking standard locations..
checking /home/elly ...
checking /usr/local ...
checking /sw ...
checking /opt ...
checking /opt/local ...
checking /usr ...
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-build-q2Vs7i/netCDF4/setup.py", line 232, in <module>
    raise ValueError('did not find netCDF version 4 headers')
ValueError: did not find netCDF version 4 headers

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-q2Vs7i/netCDF4/

我搜索了类似问题的不同页面并尝试了安装说明:

 sudo apt-get install python-dev 
 sudo apt-get install libevent-dev
 sudo apt-get indtall python-all-dev

有人有另一个想法来解决这个问题吗?谢谢!

0 个答案:

没有答案