5

OS X に netCDF4 をインストールしようとしてpip install netCDF4いますが、次のエラーが表示されます。

------------------------------------------------------------
/usr/local/bin/pip run on Wed Aug  7 23:02:37 2013
Downloading/unpacking netCDF4

  Running setup.py egg_info for package netCDF4



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

    checking /Users/mc ...

    checking /usr/local ...

    checking /sw ...

    checking /opt ...

    checking /opt/local ...

    checking /usr ...

    Traceback (most recent call last):

      File "<string>", line 16, in <module>

      File "/var/folders/jj/0w0dd3n16jq4g5579g6c7h040000gn/T/pip-build/netCDF4/setup.py", line 114, in <module>

        raise ValueError('did not find HDF5 headers')

    ValueError: did not find HDF5 headers

    Complete output from command python setup.py egg_info:



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

checking /Users/mc ...

checking /usr/local ...

checking /sw ...

checking /opt ...

checking /opt/local ...

checking /usr ...

Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "/var/folders/jj/0w0dd3n16jq4g5579g6c7h040000gn/T/pip-build/netCDF4/setup.py", line 114, in <module>

    raise ValueError('did not find HDF5 headers')

ValueError: did not find HDF5 headers

----------------------------------------

Command python setup.py egg_info failed with error code 1 in /var/folders/jj/0w0dd3n16jq4g5579g6c7h040000gn/T/pip-build/netCDF4

Exception information:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg/pip/basecommand.py", line 107, in main
    status = self.run(options, args)
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg/pip/commands/install.py", line 256, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg/pip/req.py", line 1042, in prepare_files
    req_to_install.run_egg_info()
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg/pip/req.py", line 236, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg/pip/util.py", line 612, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command python setup.py egg_info failed with error code 1 in /var/folders/jj/0w0dd3n16jq4g5579g6c7h040000gn/T/pip-build/netCDF4

すでにインストールHDF5して/usr/local/hdf5/いますが、それでも同じエラーが発生します。私はPythonが初めてなので、どんな助けでも大歓迎です。

ありがとうございました。

4

2 に答える 2

0

この手順を試して、netCDF4 をインストールしてください。

  1. リンクからHDF5をインストール

  2. リンクから netcdf4 をインストールします

  3. リンクから netcdf4-python をインストールします

詳細はリンク先をご覧ください

于 2015-10-16T10:08:16.327 に答える