NVlabs / PoseCNN-PyTorch

PyTorch implementation of the PoseCNN framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ImportError

opened this issue · comments

Hi,
I am trying to follow the installation steps described in the README.md and when I try step 6 I get the following error:

Traceback (most recent call last):
  File "setup.py", line 6, in <module>
    from torch.utils.cpp_extension import BuildExtension, CUDAExtension
ImportError: No module named torch.utils.cpp_extension

It seems PyTorch is not properly installed because when I try:

python -c "import torch; print(torch.__version__)" I get

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named torch

However, when I installed PyTorch using pip it said that PyTorch was installed successfully...

Edit: I reinstalled Pytorch and now I get:

python -c "import torch; print(torch.cuda.is_available())"
True

I think I installed PyTorch correctly and my GPU driver as well as CUDA seen to be enabled and accessible by PyTorch. Unfortunately, the initial import error still remains... Does anyone know what else might be the issue?

have you solved this? I ran into the same problem

No, I couldn't find a solution anywhere else and gave up on trying to install PoseCNN. I ended up using DOPE for my project, maybe that is an alternative for you. https://github.com/NVlabs/Deep_Object_Pose

When I run "pip3 install torch torchvision torchaudio" command with sudo, it solves the problem. but I dont know if it cause any other problem or not. I am still struggling make this work :(

When I run "pip3 install torch torchvision torchaudio" command with sudo, it solves the problem. but I dont know if it cause any other problem or not. I am still struggling make this work :(

this works for me tho, I installed pytorch with sudo

No, I couldn't find a solution anywhere else and gave up on trying to install PoseCNN. I ended up using DOPE for my project, maybe that is an alternative for you. https://github.com/NVlabs/Deep_Object_Pose

I tried to install pytorch with sudo, it helps