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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs for Installing C++ Distributions of PyTorch needs update #60372

Open
oicid opened this issue Jun 21, 2021 · 1 comment
Open

Docs for Installing C++ Distributions of PyTorch needs update #60372

oicid opened this issue Jun 21, 2021 · 1 comment
Labels
module: docs Related to our documentation, both in docs/ and docblocks triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@oicid
Copy link

oicid commented Jun 21, 2021

馃摎 Documentation

In the C++ docs, it writes:

The first step is to download the LibTorch ZIP archive via the link above. For example:
wget https://download.pytorch.org/libtorch/nightly/cpu/libtorch-shared-with-deps-latest.zip
unzip libtorch-shared-with-deps-latest.zip

Note that the above link has CPU-only libtorch. If you would like to download a GPU-enabled libtorch, find the right link in the link selector on https://pytorch.org

However, the wget links to a GPU version libtorch. I followed this tutorial on Ubuntu 20.04.2 LTS (GNU/Linux 5.4.0-73-generic x86_64), when I run cmake -DCMAKE_PREFIX_PATH=/absolute/path/to/libtorch .., I got a CMAKE error Imported target "torch" includes non-existent path "/pytorch/torch/lib":

-- The CXX compiler identification is GNU 9.3.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found Torch: /root/libtorch/lib/libtorch.so
-- Configuring done
CMake Error in CMakeLists.txt:
  Imported target "torch" includes non-existent path

    "/pytorch/torch/lib"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.
  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



CMake Error in CMakeLists.txt:
  Imported target "torch" includes non-existent path

    "/pytorch/torch/lib"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.


-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

I checked some issues, and they said it's because the CUDA were not installed correctly. But I run it on the cheapest virtual server on Digital Ocean, and there's no GPU... Could it be that I downloaded the wrong one? But I was just following the docs...

Finally I deleted this version libtorch and downloaded a cpu version from https://pytorch.org/get-started/locally/ . Then everything went well as expected.

So I think shall we update the docs?

cc @brianjo @mruberry

@VitalyFedyunin VitalyFedyunin added module: docs Related to our documentation, both in docs/ and docblocks triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels Jun 24, 2021
@mruberry
Copy link
Collaborator

@malfet Is there a more accurate label than "docs" for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: docs Related to our documentation, both in docs/ and docblocks triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

3 participants