I am trying to install DensePose but run into problems when executing make ops
.
First I get error Caffe2Config.cmake
not found, but after following the instructions here Caffe2 build from source the Caffe2Config.cmake
ends up under the build
directory.
Adding the path to the build
folder gives then the following error:
CMake Error at /home/erikbylow/Code/LocalLibs/pytorch/build/Caffe2Config.cmake:14 (include):
include could not find load file:
/home/erikbylow/Code/LocalLibs/pytorch/build/public/utils.cmake
Call Stack (most recent call first):
CMakeLists.txt:8 (find_package)
CMake Error at /home/erikbylow/Code/LocalLibs/pytorch/build/Caffe2Config.cmake:17 (include):
include could not find load file:
/home/erikbylow/Code/LocalLibs/pytorch/build/public/threads.cmake
Call Stack (most recent call first):
CMakeLists.txt:8 (find_package)
CMake Error at /home/erikbylow/Code/LocalLibs/pytorch/build/Caffe2Config.cmake:88 (include):
include could not find load file:
/home/erikbylow/Code/LocalLibs/pytorch/build/public/cuda.cmake
Call Stack (most recent call first):
CMakeLists.txt:8 (find_package)
The paths are clearly wrong since the requested cmake-
files are under pytorch/cmake/public
instead of pytorch/build/public
.
How can one resolve that? I have just followed the instructions and the tests one makes along the way works. It seems to be the installation of Caffe2
that causes the problem?
In my case, setting the environment variable
Caffe2_DIR
to the directory of the missing files solved the problem.As you mentioned, these files are in the
pytorch/cmake/public
directory instead ofpytorch/build/public
. To define the path of Caffe2 manually, open theCMakeLists.txt
in the densepose folder, add one line in the beginning:Run
make ops
again and the issue should be solved. If not, also tryAlso, after DensePose is successfully installed, remember to append its path to PYTHONPATH: