无法在Ubuntu 18.04上安装Caffe2

时间:2019-08-14 12:28:29

标签: python ubuntu pytorch setup.py caffe2

我正在尝试安装Facebook's Detectron,因此我需要安装Caffe2。我关注了this instruction

基本上,我使用
克隆PyTorch存储库 git clone https://github.com/pytorch/pytorch.git && cd pytorch git submodule update --init --recursive
以及当我运行以下命令python setup.py install

它达到84-86%,并且出现此错误。

[ 84%] Built target roi_align_op_gpu_test
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
  File "setup.py", line 756, in <module>
    build_deps()
  File "setup.py", line 321, in build_deps
    cmake=cmake)
  File "/home/milos/pytorch/tools/build_pytorch_libs.py", line 63, in build_caffe2
    cmake.build(my_env)
  File "/home/milos/pytorch/tools/setup_helpers/cmake.py", line 330, in build
    self.run(build_args, my_env)
  File "/home/milos/pytorch/tools/setup_helpers/cmake.py", line 143, in run
    check_call(command, cwd=self.build_dir, env=env)
  File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'install', '--config', 'Release', '--', '-j', '12']' returned non-zero exit status 2
Segmentation fault (core dumped)

系统信息:

  

Ubuntu 18.04 LTS(仿生海狸)
  Python 3.6.8和Python 2.7.15
  适用于两个python版本的OpenCV 3.4.0
  CUDA 10.2(Nvidia 430.26)

我曾经设法使它正常工作,但不记得如何。

0 个答案:

没有答案