Issue while installing PolyBeast

I’m getting the following error while installing PolyBeast:

    (torchbeast) user@ucomp:~/Downloads/torchbeast-master$ python setup.py install

running install
running bdist_egg
running egg_info
writing libtorchbeast.egg-info/PKG-INFO
writing dependency_links to libtorchbeast.egg-info/dependency_links.txt
writing requirements to libtorchbeast.egg-info/requires.txt
writing top-level names to libtorchbeast.egg-info/top_level.txt
reading manifest file ‘libtorchbeast.egg-info/SOURCES.txt’
writing manifest file ‘libtorchbeast.egg-info/SOURCES.txt’
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
– Caffe2: CUDA detected: 10.1
– Caffe2: CUDA nvcc is: /usr/bin/nvcc
– Caffe2: CUDA toolkit directory: /usr
– Caffe2: Header version is: 10.1
– Found cuDNN: v8.1.1 (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libcudnn.so)
– /usr/lib/x86_64-linux-gnu/libnvrtc.so shorthash is 5e8a26c9
– Added CUDA NVCC flags for: -gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_70,code=sm_70
CMake Warning at /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:22 (message):
static library kineto_LIBRARY-NOTFOUND not found.
Call Stack (most recent call first):
/home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:127 (append_torchlib_if_found)
CMakeLists.txt:51 (find_package)

CMake Error at CMakeLists.txt:63 (add_subdirectory):
add_subdirectory given source
“/home/user/Downloads/torchbeast-master/third_party/grpc/third_party/googletest”
which is not an existing directory.

CMake Error at CMakeLists.txt:96 (pybind11_add_module):
Unknown CMake command “pybind11_add_module”.

– Configuring incomplete, errors occurred!
See also “/home/user/Downloads/torchbeast-master/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeOutput.log”.
See also “/home/user/Downloads/torchbeast-master/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeError.log”.

OS: Ubuntu 20 x64
GPU: GTX 660Ti

Try following the TorchBeast installation README, in particular, checkout all submodules.

Thanks for the response.
I’ve already been following said instruction steps:

(torchbeast) user@ucomp:~/Downloads/torchbeast-master$ pip install -r requirements.txt
Requirement already satisfied: gym[atari]>=0.14.0 in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from -r requirements.txt (line 1)) (0.18.3)
Requirement already satisfied: atari-py==0.2.5 in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from -r requirements.txt (line 2)) (0.2.5)
Requirement already satisfied: gitpython>=2.1 in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from -r requirements.txt (line 3)) (3.1.18)
Requirement already satisfied: opencv-python in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from -r requirements.txt (line 5)) (4.5.2.54)
Requirement already satisfied: flake8 in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from -r requirements.txt (line 7)) (3.9.2)
Requirement already satisfied: black in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from -r requirements.txt (line 8)) (21.6b0)
Requirement already satisfied: pre-commit in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from -r requirements.txt (line 9)) (2.13.0)
Requirement already satisfied: numpy in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from atari-py==0.2.5->-r requirements.txt (line 2)) (1.21.0)
Requirement already satisfied: six in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from atari-py==0.2.5->-r requirements.txt (line 2)) (1.16.0)
Requirement already satisfied: typing-extensions>=3.7.4.0 in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from gitpython>=2.1->-r requirements.txt (line 3)) (3.10.0.0)
Requirement already satisfied: gitdb<5,>=4.0.1 in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from gitpython>=2.1->-r requirements.txt (line 3)) (4.0.7)
Requirement already satisfied: smmap<5,>=3.0.1 in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from gitdb<5,>=4.0.1->gitpython>=2.1->-r requirements.txt (line 3)) (4.0.0)
Requirement already satisfied: Pillow<=8.2.0 in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from gym[atari]>=0.14.0->-r requirements.txt (line 1)) (8.2.0)
Requirement already satisfied: pyglet<=1.5.15,>=1.4.0 in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from gym[atari]>=0.14.0->-r requirements.txt (line 1)) (1.5.15)
Requirement already satisfied: scipy in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from gym[atari]>=0.14.0->-r requirements.txt (line 1)) (1.7.0)
Requirement already satisfied: cloudpickle<1.7.0,>=1.2.0 in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from gym[atari]>=0.14.0->-r requirements.txt (line 1)) (1.6.0)
Requirement already satisfied: pycodestyle<2.8.0,>=2.7.0 in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from flake8->-r requirements.txt (line 7)) (2.7.0)
Requirement already satisfied: importlib-metadata in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from flake8->-r requirements.txt (line 7)) (4.6.0)
Requirement already satisfied: mccabe<0.7.0,>=0.6.0 in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from flake8->-r requirements.txt (line 7)) (0.6.1)
Requirement already satisfied: pyflakes<2.4.0,>=2.3.0 in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from flake8->-r requirements.txt (line 7)) (2.3.1)
Requirement already satisfied: click>=7.1.2 in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from black->-r requirements.txt (line 8)) (8.0.1)
Requirement already satisfied: toml>=0.10.1 in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from black->-r requirements.txt (line 8)) (0.10.2)
Requirement already satisfied: pathspec<1,>=0.8.1 in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from black->-r requirements.txt (line 8)) (0.8.1)
Requirement already satisfied: appdirs in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from black->-r requirements.txt (line 8)) (1.4.4)
Requirement already satisfied: regex>=2020.1.8 in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from black->-r requirements.txt (line 8)) (2021.7.1)
Requirement already satisfied: mypy-extensions>=0.4.3 in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from black->-r requirements.txt (line 8)) (0.4.3)
Requirement already satisfied: typed-ast>=1.4.2 in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from black->-r requirements.txt (line 8)) (1.4.3)
Requirement already satisfied: nodeenv>=0.11.1 in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from pre-commit->-r requirements.txt (line 9)) (1.6.0)
Requirement already satisfied: cfgv>=2.0.0 in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from pre-commit->-r requirements.txt (line 9)) (3.3.0)
Requirement already satisfied: pyyaml>=5.1 in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from pre-commit->-r requirements.txt (line 9)) (5.4.1)
Requirement already satisfied: identify>=1.0.0 in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from pre-commit->-r requirements.txt (line 9)) (2.2.10)
Requirement already satisfied: virtualenv>=20.0.8 in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from pre-commit->-r requirements.txt (line 9)) (20.4.7)
Requirement already satisfied: filelock<4,>=3.0.0 in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from virtualenv>=20.0.8->pre-commit->-r requirements.txt (line 9)) (3.0.12)
Requirement already satisfied: distlib<1,>=0.3.1 in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from virtualenv>=20.0.8->pre-commit->-r requirements.txt (line 9)) (0.3.2)
Requirement already satisfied: zipp>=0.5 in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from importlib-metadata->flake8->-r requirements.txt (line 7)) (3.5.0)
(torchbeast) user@ucomp:~/Downloads/torchbeast-master$ git submodule update --init --recursive
(torchbeast) user@ucomp:~/Downloads/torchbeast-master$ pip install nest/
Processing ./nest
  DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default.
   pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555.
Requirement already satisfied: pybind11>=2.3 in /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages (from nest==0.0.3) (2.6.2)
Building wheels for collected packages: nest
  Building wheel for nest (setup.py) ... done
  Created wheel for nest: filename=nest-0.0.3-cp37-cp37m-linux_x86_64.whl size=1215764 sha256=11d1024ad007694640d9804a26d32ba8cc31c2b53719171ba47d456a9a9ce582
  Stored in directory: /tmp/pip-ephem-wheel-cache-p8qhamws/wheels/9b/57/12/c6a0c0c3de33b39f55aa0faa2250fe4ba9f288c67c1e642587
Successfully built nest
Installing collected packages: nest
  Attempting uninstall: nest
    Found existing installation: nest 0.0.3
    Uninstalling nest-0.0.3:
      Successfully uninstalled nest-0.0.3
Successfully installed nest-0.0.3
(torchbeast) user@ucomp:~/Downloads/torchbeast-master$ python setup.py install
running install
running bdist_egg
running egg_info
writing libtorchbeast.egg-info/PKG-INFO
writing dependency_links to libtorchbeast.egg-info/dependency_links.txt
writing requirements to libtorchbeast.egg-info/requires.txt
writing top-level names to libtorchbeast.egg-info/top_level.txt
reading manifest file 'libtorchbeast.egg-info/SOURCES.txt'
writing manifest file 'libtorchbeast.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
-- Caffe2: CUDA detected: 10.1
-- Caffe2: CUDA nvcc is: /usr/bin/nvcc
-- Caffe2: CUDA toolkit directory: /usr
-- Caffe2: Header version is: 10.1
-- Found cuDNN: v8.1.1  (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libcudnn.so)
-- /usr/lib/x86_64-linux-gnu/libnvrtc.so shorthash is 5e8a26c9
-- Added CUDA NVCC flags for: -gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_70,code=sm_70
CMake Warning at /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:22 (message):
  static library kineto_LIBRARY-NOTFOUND not found.
Call Stack (most recent call first):
  /home/user/anaconda3/envs/torchbeast/lib/python3.7/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:127 (append_torchlib_if_found)
  CMakeLists.txt:51 (find_package)


CMake Error at CMakeLists.txt:63 (add_subdirectory):
  add_subdirectory given source
  "/home/user/Downloads/torchbeast-master/third_party/grpc/third_party/googletest"
  which is not an existing directory.


CMake Error at CMakeLists.txt:96 (pybind11_add_module):
  Unknown CMake command "pybind11_add_module".


-- Configuring incomplete, errors occurred!
See also "/home/user/Downloads/torchbeast-master/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeOutput.log".
See also "/home/user/Downloads/torchbeast-master/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeError.log".
(torchbeast) user@ucomp:~/Downloads/torchbeast-master$ 

I’m using Cmake 3.20, and have gcc 7, 8 and 9 installed.

Just a guess here:
I ran into a similar problem when installing polybeast - although mine was for CUDNN:

“static library kineto_LIBRARY-NOTFOUND not found.”

I had that error for CUDNN (yours finds CUDNN no problem). In my case to solve I had move some files around and update some CUDNN_LIBRARY_PATH nonsense. Maybe you need to do something similar - i.e. help cmake find kineto by updating a path.

Hey @Crohixis: Can you confirm you ran something like

git submodule update --init --recursive

after git cloning TorchBeast? I’m asking because your response doesn’t seem to mention Git submodules, and the error message you shared contains the line third_party/grpc/third_party/googletest [...] is not an existing directory.

You can also check if the third_party subdirectory inside the TorchBeast source code is populated, and also if the third_party/grpc/third_party one is (so that all submodules are checked out, recursively).

1 Like

Hey @heinrich_kuttler, thanks for your reply.
I’ve reinstalled PolyBeast using this command first:

git clone --recursive https://github.com/facebookresearch/torchbeast ./

Issue seems to be resolved.

1 Like