Unable to find torch_shm_manager when importing pytorch with python 3.7

Hello, while pytorch works fine for me with python3.6, I get this error when trying to import it in python3.7 :

>>> import torch
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.7/site-packages/torch/__init__.py", line 427, in <module>
    _C._initExtension(manager_path())
  File "/usr/lib/python3.7/site-packages/torch/__init__.py", line 422, in manager_path
    raise RuntimeError("Unable to find torch_shm_manager at " + path)
RuntimeError: Unable to find torch_shm_manager at /usr/lib/python3.7/site-packages/torch/bin/torch_shm_manager

Why is torch looking for torch_shm_manager under /usr/lib/python3.7/site-packages? I find torch_shm_manager under /usr/bin/torch_shm_manager.
Is there anything wrong with my install?

How did you install PyTorch? Did you build it from source or did you install the conda/pip binaries?

Hi @ptrblck I built it from source via the gentoo package manager: portage

I’m not familiar with the Gentoo and this package manager, but are you able to install and run it without these tools?