caffe下安装python库
来源:互联网 发布:软件质量品质管理 编辑:程序博客网 时间:2024/04/29 17:30
1、文件caffe-master/python/requirements.txt列举了Caffe依赖的python库,最简单的方法是用pip安装,pip的安装方法:
curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.pysudo python get-pip.py如果命令不能直接运行,则可以直接打开上面的网站链接,另存为get-pip.py
然后开始用pip安装刚才的依赖吧:(在caffe-master目录下)
sudo pip install -r python/requirements.txt
2、手动安装
下面是caffe-master/python/requirements.txt的内容(从上到下安装,有些库对上面的库有所依赖):
Cython>=0.19.2
numpy>=1.7.1
scipy>=0.13.2
scikit-image>=0.9.3
matplotlib>=1.3.1
ipython>=1.1.0
h5py>=2.2.0
leveldb>=0.191
networkx>=1.8.1
nose>=1.3.0
pandas>=0.12.0
python-dateutil>=1.4,<2
protobuf>=2.5.0
python-gflags>=2.0
pyyaml>=3.10
Pillow>=2.3.0
以 Cython 为例,手动的话用 sudo pip install Cython 即可,然后在 pip 的过程中有什么问题就相应解决。
3、在 caffe 目录下编译编译Python和Matlab用到的caffe文件
5、遇到的问题:
(1)install scipy problem:
Command /usr/local/opt/python3/bin/python3.3 -c "import setuptools, tokenize;file='/private/tmp/pip_build_root/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-9r7808-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/scipy Storing debug log for failure in /Users/dan/.pip/pip.log
解决方法:
sudo apt-get install python python-dev libatlas-base-dev gcc gfortran g++
(2)如果 pip 无法正常安装protobuf,则
使用 sudo apt-get install -y python-protobuf 完成对protobuf 的安装。
参考博客:
http://www.cnblogs.com/alfredtofu/p/3577241.html
http://stackoverflow.com/questions/22878109/error-installing-scipy-library-through-pip-on-python-3-compile-failed-with-err
http://blog.csdn.net/baobei0112/article/details/43083235(非常好的安装caffe的博客)
- caffe下安装python库
- caffe下python依赖库的安装及问题
- Ubuntu下安装caffe的Python接口
- 【Caffe安装】 如何在Windows下安装配置python接口的caffe(GPU)
- caffe中安装python
- caffe 安装方法(python)
- linux下安装caffe(无cuda)以及python接口
- ubuntu14.04下安装caffe 仅cpu python接口
- caffe安装中python下运行缺少的模块
- windows下安装配置TensorFlow,caffe的Python接口
- Mac下安装Caffe
- windows7下caffe安装
- Linux下安装caffe
- Ubuntu下安装caffe
- mac下安装caffe
- windows下安装caffe
- Mac下Caffe安装
- Windows10下安装Caffe
- tomcat部署web应用的几种方式
- Markdown使用
- STL-优先队列(priority queue)
- NSDictionary,NSArray转成NSData(JSON)NSString类型
- java(30) - 对象浅克隆和深克隆
- caffe下安装python库
- Go语言数据结构
- HDU-2674 N!Again 水题
- 计算机网络基础笔记4
- GCC Warning ISO C++11 Does not allow conversion from literal string to char*
- 编译内核2.3.4遇到的问题以及解决方案
- javascript弹出窗口实现动态文件上传
- 苹果所有常用证书,appID,Provisioning Profiles配置说明及制作图文教程(精)
- Linux Color