How to import caffe module in Python?

混江龙づ霸主 提交于 2019-12-01 13:48:08

You need to add Python Caffe to PYTHONPATH. For example: export PYTHONPATH=$PYTHONPATH:/home/username/caffe/python

For windows :

Adding /caffe/Build/x64/Release/pycaffe to system path(path) works for me, and I think the best way to do it is :

  1. New a system variable : PYTHON_PKG = /caffe/Build/x64/Release/pycaffe;
  2. Include PYTHON_PKG in path : path = %PYTHON_PKG%; %OtherDirs%

After I did this, I get PKG missing google.internal, then I did pip install google.internal in CMD. It works.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!