zju3dv / pvnet-rendering

render images for pvnet training
Apache License 2.0
183 stars 46 forks source link

No module named 'transforms3d' #3

Closed DC1991 closed 5 years ago

DC1991 commented 5 years ago

Dear author, Can you help me solve this problem? I have installed transforms3d and I can import it from other python files. I do not know why I can't import it in render_backend.py. The error information is as follows: found bundled python: /home/xxx/Documents/config/blender-2.79a-linux-glibc219-x86_64/2.79/python File "/home/xxx/rendering/blender/render_backend.py", line 7, in Read blend: /home/xxx/rendering/data/blank.blend from transforms3d.euler import euler2mat ImportError: No module named 'transforms3d'

DC1991 commented 5 years ago

Solved

571502680 commented 5 years ago

How was it solved

pengsida commented 5 years ago

blender has its own python.

571502680 commented 5 years ago

blender has its own python.

Thanks,I have solved。

caijunhao commented 5 years ago

Hi @571502680, I encounter the same problem and have no idea, could you please tell me how to solve it concretely?

caijunhao commented 5 years ago

Can I run the script using standard python instead of blender's one?

pengsida commented 5 years ago

No.

ming-c commented 5 years ago

A (dumb) workaround is to copy the missing libraries (packages or modules) from the lib dir of your preferred python interpreter to the blender python lib dir (which can be found in the error message).

For instance, for me, the solution is cp -r /home/MYNAME/Applications/anaconda3/lib/python3.7/site-packages/transforms3d* /home/MYNAME/Applications/blender-2.79-linux-glibc219-x86_64/2.79/python/lib/python3.5/site-packages/

Above dirs should be changed according to one's own settings.

pengsida commented 5 years ago

A better way is to install pip for blender python and use blender pip to install python libraries. https://github.com/pengsida/configuration/blob/master/blender/install_pip.py