5

I am following this guide to build Pytorch from scratch on a Raspberry Pi3B. For some reason, there is an error:

Building wheel torch-1.2.0a0+f13fadd
-- Building version 1.2.0a0+f13fadd
cmake --build . --target install --config Release -- -j 4
make: *** No rule to make target 'install'.  Stop.

when I call python3 setup.py build. I am running Python version 3.5 and I am unsure why this seems to be failing.

Berriel
  • 12,659
  • 4
  • 43
  • 67
user7722867
  • 478
  • 3
  • 17
  • This problem went away after a complete reinstall of the OS and using CondaBerry. Don't know why but something to try for anyone who gets the same problem. – user7722867 Jun 28 '19 at 14:37

2 Answers2

6

I solved this problem with reference to this link.

This error happened at my second installation attempt. During the first I forgot to install the c++ compiler and got CMAKE_CXX_COMPILER not found. With a proper compiler installed, the second attempt gave me the "No rule to make target 'install'" error as mentioned in the question.

The problem was solved by removing the build/ directory and re-run python setup.py install.

So it seems this is caused by the cached build information.

shawn233
  • 61
  • 1
  • 3
5

Recently I encountered this error so after some research, in https://stackoverflow.com/a/46987554/12164529 someone mentioned something about cache. Therefore I guess that's because of some CMake cache behavior, so I run this command:

sudo USE_ROCM=1 USE_LMDB=1 USE_OPENCV=1 MAX_JOBS=15 python setup.py clean

And the error went away.

ps. This is my first answer on stackoverflow, and I'm not sure if this is a good one, but I hope it helps people find here.

ZiY Chen
  • 51
  • 1
  • 4