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

Error on running "Predict Rig" on Linux #18

Open
EvgenyRodygin opened this issue Nov 25, 2021 · 2 comments
Open

Error on running "Predict Rig" on Linux #18

EvgenyRodygin opened this issue Nov 25, 2021 · 2 comments

Comments

@EvgenyRodygin
Copy link

Hi and thanks a lot for this great addon (which I'm not able to test out yet :D)
I have the following issue and would be really glad if you could help somehow:

System: Ubuntu 20.04, Blender 2.93
I have followed the instructions but slightly updated package versions. Installed CudaToolkit 11.1 + Pytorch 1.8.2 (tried 1.10 as well)
The addon is installed correctly. It sees CudaToolkit (when I run Blender through cmd). The modules are installed with Conda + python 3.7 (tried virtualenv as well) and are ok in Blender:
Screenshot from 2021-11-25 23-06-10

The problem arises when I press "Predict Rig" button. That's what I have:

Error: Traceback (most recent call last):
File "/snap/blender/1113/2.93/scripts/modules/addon_utils.py", line 438, in disable
mod.unregister()
File "/home/evgeny/.config/blender/2.93/scripts/addons/brignet-main/init.py", line 80, in unregister
from . import rignetconnect
File "/home/evgeny/.config/blender/2.93/scripts/addons/brignet-main/rignetconnect.py", line 6, in
import torch
File "/home/evgeny/apps/miniconda3/envs/brignet/lib/python3.7/site-packages/torch/init.py", line 213, in
raise ImportError(textwrap.dedent('''
ImportError: Failed to load PyTorch C extensions:
It appears that PyTorch has loaded the torch/_C folder
of the PyTorch repository rather than the C extensions which
are expected in the torch._C namespace. This can occur when
using the install workflow. e.g.
$ python setup.py install && python -c "import torch"
This error can generally be solved using the develop workflow
$ python setup.py develop && python -c "import torch" # This should succeed
or by running Python from a different directory.

@tzhouwsu
Copy link

hi, I came across this exact problem recently.
it seems the fix to this problem is to align the python version with that in blender.
I'm using blender-3.2.0-linux-x64 (it comes with python3.10), my machine has CUDA-11.7 with Nvidia driver 515.43.04. my conda environmen is created by:

conda create -n brignet python=3.10
conda activate brignet

I installed torch-1.11.0 with CUDA11.3 using pip command, and here is my "pip list | grep torch":

torch              1.11.0+cu113
torch-cluster      1.6.0
torch-geometric    2.0.4
torch-scatter      2.0.9
torch-sparse       0.6.13
torch-spline-conv  1.2.1
torchaudio         0.11.0+cu113
torchvision        0.12.0+cu113

@kenan9875645
Copy link

hi, I came across this exact problem recently. it seems the fix to this problem is to align the python version with that in blender. I'm using blender-3.2.0-linux-x64 (it comes with python3.10), my machine has CUDA-11.7 with Nvidia driver 515.43.04. my conda environmen is created by:

conda create -n brignet python=3.10
conda activate brignet

I installed torch-1.11.0 with CUDA11.3 using pip command, and here is my "pip list | grep torch":

torch              1.11.0+cu113
torch-cluster      1.6.0
torch-geometric    2.0.4
torch-scatter      2.0.9
torch-sparse       0.6.13
torch-spline-conv  1.2.1
torchaudio         0.11.0+cu113
torchvision        0.12.0+cu113

Hello, after installing according to your configuration, Blender cannot recognize torch, torch cluster, etc.

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

3 participants