2016-06-30 111 views
0

我試圖安裝pytables:Bluemix星火:PIP安裝--user表==錯誤::找不到本地HDF5安裝

!pip install --user tables 

結果

Collecting tables 
    Using cached tables-3.2.2.tar.gz 
    Complete output from command python setup.py egg_info: 
    /bin/ld: cannot find -lhdf5 
    collect2: error: ld returned 1 exit status 
    * Using Python 2.7.11 (default, Apr 19 2016, 15:04:20) 
    * USE_PKGCONFIG: True 
    .. ERROR:: Could not find a local HDF5 installation. 
     You may need to explicitly state where your local HDF5 headers and 
     library can be found by setting the ``HDF5_DIR`` environment 
     variable or by using the ``--hdf5`` command-line option. 

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

如何我可以解決這個問題嗎?我沒有這項服務的管理員權限。

還有很多類似的問題,但這一個是專門針對Bluemix Spark服務的問題。

回答

0

這爲我工作:

!wget http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.17.tar.bz2 
!tar jxf hdf5-1.8.17.tar.bz2 
!cd hdf5-1.8.17 && ./configure --prefix=$HOME/hdf5-bin && make && make install 
!HDF5_DIR=$HOME/hdf5-bin pip install --user tables 
... 
output omitted for brevity 
... 
Installing collected packages: tables 
    Running setup.py install for tables ... [?25l- \ |/- \ |/- \ |/- \ |/- \ |/- \ |/- \ |/- \ |/- \ |/- \ |/- \ |/- \ |/- \ |/- \ |/- \ |/- \ |/- \ |/- \ |/- \ |/- \ |/- \ |/- \ |/- \ |/- \ |/- \ done 
[?25hSuccessfully installed tables-3.2.2 
+1

尼斯。沿着類似的脈絡,我寫了一個安裝HDF5,NETCDF4和H5PY的筆記本[https://github.com/joshisa/bluemix-hdf5/blob/master/hdf5.ipynb]。 –

+0

感謝分享Sanjay! –