Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake Error at CMakeLists.txt:106 (ADD_TORCH_PACKAGE): Unknown CMake command "ADD_TORCH_PACKAGE". #149

Open
drago8055 opened this issue Oct 22, 2019 · 1 comment

Comments

@drago8055
Copy link

Hi everyone,
When trying to make, I got the following error:

CMake Warning at CMakeLists.txt:48 (FIND_PACKAGE):
 By not providing "FindTorch.cmake" in CMAKE_MODULE_PATH this project has
 asked CMake to find a package configuration file provided by "Torch", but
 CMake did not find one.

 Could not find a package configuration file provided by "Torch" with any of
 the following names:

   TorchConfig.cmake
   torch-config.cmake

 Add the installation prefix of "Torch" to CMAKE_PREFIX_PATH or set
 "Torch_DIR" to a directory containing one of the above files.  If "Torch"
 provides a separate development package or SDK, be sure it has been
 installed.

I did the following to solve it:

export Torch_DIR=~/.conda/envs/course_work/lib/python3.7/site-packages/torch/share/cmake/Torch

Then I got the following error:

CMake Error at CMakeLists.txt:98 (INSTALL):
 INSTALL TARGETS given no LIBRARY DESTINATION for shared library target
 "warpctc".


CMake Error at CMakeLists.txt:106 (ADD_TORCH_PACKAGE):
 Unknown CMake command "ADD_TORCH_PACKAGE".

Kindly help.

@1z-z1
Copy link

1z-z1 commented Dec 25, 2019

You need the Torch7 package installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants