Reputation: 1332
I have build .dll of _caffe.cpp on Windows (Release, x64).
I changed extension .dll to .pyd and trying to import it in python:
import caffe
File "\caffe-master\python\caffe\__init__.py", line 1, in <module>
from .pycaffe import Net, SGDSolver
File "\caffe-master\python\caffe\pycaffe.py", line 13, in <module>
from ._caffe import Net, SGDSolver
ImportError: DLL load failed: The specified module could not be found.
What does it mean, some module of dependencies missing which was included in project in Visual Studio, where I build this dll?
Upvotes: 0
Views: 7135
Reputation: 512
Once you have a compiled and built caffe, try
echo 'export PYTHONPATH=/path/to/caff-dir/python'
Also, you may need to run following:
pip install -r requirement.txt
Upvotes: 0
Reputation: 2121
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 :
PYTHON_PKG = /caffe/Build/x64/Release/pycaffe;
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.
Upvotes: 2
Reputation: 315
You need to add Python Caffe to PYTHONPATH. For example: export PYTHONPATH=$PYTHONPATH:/home/username/caffe/python
Upvotes: 2