簡體   English   中英

嘗試運行python程序時出現“沒有名為caffe的模塊”錯誤

[英]“No module named caffe” error when trying to run python program

我最近開始做夢很深的VFX,但是在輸入bash python video.py后出現了此錯誤:

Traceback (most recent call last):
  File "video.py", line 19, in <module>
    import caffe
ImportError: No module named caffe

我是這方面的新手,我查了三天,卻仍然不知所措,有人可以幫忙嗎? 我嘗試使用這些說明來安裝caffe,但是在運行make all時仍然出現錯誤。 他們在另一個線程上說要下載並設置OpenCV使其正常工作,但也失敗了...

這些是我在安裝Caffe時遇到的錯誤

CXX src/caffe/layers/hdf5_data_layer.cpp
src/caffe/layers/hdf5_data_layer.cpp:13:10: fatal error: hdf5.h: No such file or directory
 #include "hdf5.h"
          ^~~~~~~~
compilation terminated.
Makefile:581: recipe for target '.build_release/src/caffe/layers/hdf5_data_layer.o' failed
make: *** [.build_release/src/caffe/layers/hdf5_data_layer.o] Error 1

這是我在嘗試完成OpenCV設置時遇到的錯誤:

c@c-VirtualBox:~/opencv$ python removeRedEyes.py
python: can't open file 'removeRedEyes.py': [Errno 2] No such file or directory

盡管有很多相關文章,但從2015年到2016年,它們似乎都已經過時了。

如果您使用的是Linux,請將+++ INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial/到Makefile.config

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM