ImportError cannot import name BytesIO when import caffe
来源:互联网 发布:裁床捆条算法公式 编辑:程序博客网 时间:2024/06/04 19:11
转自:https://github.com/BVLC/caffe/issues/1549
I am trying to make caffe running on my machine equipped with Ubuntu 12.04LTS.
After finishing all the steps on the Installation page, I trained the LeNet model successfully and tried to use it as the tutorial from here. Then I got the following error:
Traceback (most recent call last): File "<string>", line 1, in <module>ImportError: No module named caffeError in sys.excepthook:Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 66, in apport_excepthook from apport.fileutils import likely_packaged, get_recent_crashes File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 1, in <module> from apport.report import Report File "/usr/lib/python2.7/dist-packages/apport/report.py", line 18, in <module> import problem_report File "/usr/lib/python2.7/dist-packages/problem_report.py", line 14, in <module> import zlib, base64, time, sys, gzip, struct, os File "/usr/lib/python2.7/gzip.py", line 10, in <module> import io File "${HOME}/path/to/caffe/python/caffe/io.py", line 2, in <module> import skimage.io File "/usr/local/lib/python2.7/dist-packages/skimage/io/__init__.py", line 11, in <module> from ._io import * File "/usr/local/lib/python2.7/dist-packages/skimage/io/_io.py", line 1, in <module> from io import BytesIOImportError: cannot import name BytesIOOriginal exception was:Traceback (most recent call last): File "<string>", line 1, in <module>ImportError: No module named caffe
I set the PYTHONPATH in .bashrc file before I did the above.
What is the problem? Could anyone give some hint? I am really confused.
Solution:
This issue was also posted as a question on Stack Overflow;
it looks like you set your PYTHONPATH to include ${HOME}/path/to/caffe/python/caffe$
rather than
${HOME}/path/to/caffe/python $
(note the lack of the last caffe part in that).
0 0
- ImportError cannot import name BytesIO when import caffe
- ImportError: cannot import name Pseudo
- Python ImportError: cannot import name *
- ImportError: cannot import name IncompleteRead
- ImportError: cannot import name HTTPSHandler
- importError: cannot import name 'izip_longest'
- ImportError: cannot import name mkdtemp
- ImportError: cannot import name HTTPSHandler
- ImportError:cannot import name game
- ImportError: cannot import name Process
- ImportError: cannot import name 'NUMPY_MKL'
- ImportError: cannot import name webdriver
- ImportError: cannot import name ContextualZipFile
- ImportError: cannot import name NUMPY_MKL
- ImportError: cannot import name 'Process'
- ImportError: cannot import name downsample
- ImportError: cannot import name IncompleteRead
- ImportError: cannot import name __check_build
- MySQL备忘之数据更新篇(INSERT, UPDATE, DELETE)
- LInux sed命令详解
- 记录项目分包结构
- iOS给UITextView添加Placeholder
- 位图索引BitMap
- ImportError cannot import name BytesIO when import caffe
- ubuntu平台vivado无法识别NIC_ID而无法使用license的解决办法
- Linux netstat命令详解
- 泛腾科技xStorage6110 6U VPX大容量存储系统
- NDK学习笔记2之捕获native层的段错误
- sparkStreaming+kafka python版wordcount申请资源不成功
- 浏览器无法连接的解决方法 windows无法与设备和资源通信的解决方法
- 零基础学习PHP:学前简介(一)
- eclipse下maven打包"错误: 编码GBK的不可映射字符"