start with caffe on windows. Import caffe error. I am beginner

70 views
Skip to first unread message

mohsen zarrindel

unread,
Jun 10, 2017, 1:35:29 AM6/10/17
to Caffe Users

hello

I have installed Anaconda, cafee, cuda and Visual Studio 2015 on windows 7. I want to start with caffe. So I run "open with Ipython" from Anaconda.When I type "import caffe" I have this error:

In [1]: import caffe
Failed to include caffe_pb2, things might go wrong! ImportError Traceback (most recent call last)
<ipython-input-1-1cca3aa1f8c5> in <module>()
----> 1 import caffe
C:\Users\mohsen\Anaconda3\envs\firstEnvironment\caffe\__init__.py in <module>()
2 from ._caffe import init_log, log, set_mode_cpu, set_mode_gpu, set_devic
e, Layer, get_solver, layer_type_list, set_random_seed, solver_count, set_solver
_count, solver_rank, set_solver_rank, set_multiprocess, has_nccl
3 from ._caffe import __version__
----> 4 from .proto.caffe_pb2 import TRAIN, TEST
5 from .classifier import Classifier
6 from .detector import Detector

C:\Users\mohsen\Anaconda3\envs\firstEnvironment\caffe\proto\caffe_pb2.py in <mod ule>()
4 import sys
5 _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
----> 6 from google.protobuf.internal import enum_type_wrapper
7 from google.protobuf import descriptor as _descriptor
` 8 from google.protobuf import message as _message``

ImportError: No module named 'google'

[In [2]:

I tried another way too.I run CMD on caffe root. then I typed "python". But when I typed "import caffe" I have this error:

>>> import caffe
Failed to include caffe_pb2, things might go wrong!
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\mohsen\Anaconda3\envs\firstEnvironment\caffe\__init__.py", line
4, in <module>
from .proto.caffe_pb2 import TRAIN, TEST
File "C:\Users\mohsen\Anaconda3\envs\firstEnvironment\caffe\proto\caffe_pb2.py
", line 6, in <module>
from google.protobuf.internal import enum_type_wrapper
ImportError: No module named 'google'

I am beginner to caffe. I do not know what is my problem?

Reply all
Reply to author
Forward
0 new messages