ImportError: dynamic module does not define init function (PyInit__caffe)

102 views
Skip to first unread message

Mona Jalal

unread,
Aug 23, 2016, 6:23:46 PM8/23/16
to Caffe Users
I am using Py-Faster-RCNN which uses Caffe. I got this error:

ImportError: dynamic module does not define init function (PyInit__caffe)

In the following:

(cv) jalal@klein:~/computer_vision/py-faster-rcnn$ ./tools/demo.py
Traceback (most recent call last):
  File "./tools/demo.py", line 18, in <module>
    from fast_rcnn.test import im_detect
  File "/home/jalal/computer_vision/py-faster-rcnn/tools/../lib/fast_rcnn/test.py", line 16, in <module>
    import caffe
  File "/home/jalal/computer_vision/py-faster-rcnn/tools/../caffe-fast-rcnn/python/caffe/__init__.py", line 1, in <module>
    from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver
  File "/home/jalal/computer_vision/py-faster-rcnn/tools/../caffe-fast-rcnn/python/caffe/pycaffe.py", line 13, in <module>
    from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, \
ImportError: dynamic module does not define init function (PyInit__caffe)


Do you know how can that be fixed?

I have Pyhton3.4.3+ on Ubuntu15.10.

Has anyone got Caffe to work with Python 3?

Hailing Wu

unread,
Mar 22, 2018, 2:46:20 AM3/22/18
to Caffe Users
Did you fix it? I got the same error with python3.6 ubuntu17.10. :(
Reply all
Reply to author
Forward
0 new messages