Python netCDF4安装错误

时间:2017-10-20 13:16:47

标签: python ubuntu-14.04 netcdf4

我试图在Ubuntu 14.04上使用

在python 2.7上安装netCDF4软件包
sudo pip install --user netCDF4

安装崩溃时出现以下错误:

error: unknown file type '.pyx' (from 'netCDF4/_netCDF4.pyx')

我从其他主题中发现的唯一暗示是这与pyrex / Cython有关。知道我能做些什么来解决这个问题吗?

这里是安装的全部输出:

haaviston@tuomi13kl:~/.local/lib/python2.7/site-packages/pkg_resources$ pip install --user netCDF4
Downloading/unpacking netCDF4
  Downloading netCDF4-1.3.0.tar.gz (542kB): 542kB downloaded
  Running setup.py (path:/tmp/pip_build_haaviston/netCDF4/setup.py) egg_info for package netCDF4
    Package hdf5 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `hdf5.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'hdf5' found
    using nc-config ...

        HDF5_DIR environment variable not set, checking some standard locations ..
    checking /home/haaviston ...
    checking /usr/local ...
    checking /sw ...
    checking /opt ...
    checking /opt/local ...
    checking /usr ...
    HDF5 library version: 1.8.11 found in /usr
    using netcdf library version 4.1.3
    using Cython to compile netCDF4.pyx...
    netcdf lib does not have group rename capability
    netcdf lib has nc_inq_path function
    netcdf lib does not have nc_inq_format_extended function
    netcdf lib does not have nc_open_mem function
    netcdf lib does not have cdf-5 format capability

Requirement already satisfied (use --upgrade to upgrade): numpy>=1.7 in /usr/lib/python2.7/dist-packages (from netCDF4)
Installing collected packages: netCDF4
  Running setup.py install for netCDF4
    Package hdf5 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `hdf5.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'hdf5' found
    using nc-config ...

        HDF5_DIR environment variable not set, checking some standard locations ..
    checking /home/haaviston ...
    checking /usr/local ...
    checking /sw ...
    checking /opt ...
    checking /opt/local ...
    checking /usr ...
    HDF5 library version: 1.8.11 found in /usr
    using netcdf library version 4.1.3
    using Cython to compile netCDF4.pyx...
    netcdf lib does not have group rename capability
    netcdf lib has nc_inq_path function
    netcdf lib does not have nc_inq_format_extended function
    netcdf lib does not have nc_open_mem function
    netcdf lib does not have cdf-5 format capability
    building 'netCDF4._netCDF4' extension
    error: unknown file type '.pyx' (from 'netCDF4/_netCDF4.pyx')
    Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_haaviston/netCDF4/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-5Mjz_n-record/install-record.txt --single-version-externally-managed --compile --user:
    Package hdf5 was not found in the pkg-config search path.

Perhaps you should add the directory containing `hdf5.pc'

to the PKG_CONFIG_PATH environment variable

No package 'hdf5' found

reading from setup.cfg...

using nc-config ...



    HDF5_DIR environment variable not set, checking some standard locations ..

checking /home/haaviston ...

checking /usr/local ...

checking /sw ...

checking /opt ...

checking /opt/local ...

checking /usr ...

HDF5 library version: 1.8.11 found in /usr

using netcdf library version 4.1.3

using Cython to compile netCDF4.pyx...

netcdf lib does not have group rename capability

netcdf lib has nc_inq_path function

netcdf lib does not have nc_inq_format_extended function

netcdf lib does not have nc_open_mem function

netcdf lib does not have cdf-5 format capability

running install

running build

running build_py

creating build

creating build/lib.linux-x86_64-2.7

creating build/lib.linux-x86_64-2.7/netcdftime

copying netcdftime/__init__.py -> build/lib.linux-x86_64-2.7/netcdftime

creating build/lib.linux-x86_64-2.7/netCDF4

copying netCDF4/__init__.py -> build/lib.linux-x86_64-2.7/netCDF4

copying netCDF4/utils.py -> build/lib.linux-x86_64-2.7/netCDF4

running build_ext

building 'netCDF4._netCDF4' extension

error: unknown file type '.pyx' (from 'netCDF4/_netCDF4.pyx')

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_haaviston/netCDF4/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-5Mjz_n-record/install-record.txt --single-version-externally-managed --compile --user failed with error code 1 in /tmp/pip_build_haaviston/netCDF4
Storing debug log for failure in /home/haaviston/.pip/pip.log

0 个答案:

没有答案