Linux写配置HDF5的python包h5py
2015-11-10 15:08
525 查看
闲言碎语不讲,直接进入正题。Python在科学计算的应用越来越丰度,而hdf(5)数据的应用也非常广泛。python提供了h5py包供开发者处理数据(http://www.h5py.org/)。在windows下配置h5py,可以通过安装Anaconda以及pythonxy来做相对方便,现在主要说在linux下该环境的配置。
(1)使用: sudo apt-get install python-pip安装pip工具,然后使用pip install numpy和pip install numpy安装基本环境。
(2)使用: sudo apt-get install libhdf5-dev安装hdf的开发库(重要)。否则会报出:
#include “hdf5.h”
compilation terminated.
error: command ‘gcc’ failed with exit status:1
(3)安装HDF5:按照官方文档的说明就可以(ftp://ftp.hdfgroup.org/HDF5/current/src/unpacked/release_docs/INSTALL)。
这里也有一个安装教程,是我后来发现的:(http://www.aichengxu.com/view/24309)
(4)使用:sudo pip install h5py安装h5py库,当你看到Successfully install h5py. Cleaning up…就大功告成了。
(5)测试一下:
import h5py as h5
h5.run_tests()
成功运行。
具体使用可以参照帮助文档(http://docs.h5py.org/en/latest/build.html)
(1)使用: sudo apt-get install python-pip安装pip工具,然后使用pip install numpy和pip install numpy安装基本环境。
(2)使用: sudo apt-get install libhdf5-dev安装hdf的开发库(重要)。否则会报出:
#include “hdf5.h”
compilation terminated.
error: command ‘gcc’ failed with exit status:1
(3)安装HDF5:按照官方文档的说明就可以(ftp://ftp.hdfgroup.org/HDF5/current/src/unpacked/release_docs/INSTALL)。
$tar zxf hdf5-X.Y.Z.tar.gz$ cd hdf5-X.Y.Z $ ./configure --prefix=/your/install/dir <more configure_flags> $ sudo make $ sudo make check # run test suite. $ sudo make install $ sudo make check-install # verify installation.
这里也有一个安装教程,是我后来发现的:(http://www.aichengxu.com/view/24309)
(4)使用:sudo pip install h5py安装h5py库,当你看到Successfully install h5py. Cleaning up…就大功告成了。
(5)测试一下:
import h5py as h5
h5.run_tests()
成功运行。
具体使用可以参照帮助文档(http://docs.h5py.org/en/latest/build.html)
相关文章推荐
- C__ Linux C 中__user的含义
- linux系统中查看系统、资源、日志等常用命令--转载
- Vmware centos 虚拟机根分区磁盘扩容(基于LVM)
- linux tail命令使用详解
- 一个linux 命令
- linux学习之初
- CentOS 6 安装 python 2.7 和 mod_wsgi 运行pyocr[tesseract]
- CentOS7 mono环境连接WCF
- linux下解压命令大全
- linux下文件夹的创建、复制、剪切、重命名、清空和删除命令
- Linux 安装 windows 字体
- Centos5.8 x86_64下安装DRBD+Heartbeat+NFS
- Linux下实现USB口的热插拔事件触发
- linux时区问题
- 辛星浅析linux下安装rails对于sqlite3缺少的问题
- [Linux] awk命令笔记 入门
- linux server 向外网发送邮件
- Linux下搭建php+apach+mysql+svn
- Linux Hellpworld 驱动程序加载
- linux查看本机IP、gateway、dns