You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I installed pytorch3d==0.7.7 on Windows succeed,but when I try to use it I met an intresting problem like this:
If I from pytorch3d import _C it will get wrong, BUT if I 'from pytorch3d.structures import Meshes' first and then from pytorch3d import _C it will be right.
(fp) C:\Users\35964>python
Python 3.9.20 (main, Oct 3 2024, 07:38:01) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license"for more information.
>>> import pytorch3d
>>> from pytorch3d import _C
Traceback (most recent call last):
File "<stdin>", line 1, in<module>
ImportError: DLL load failed while importing _C: 找不到指定的模块。
>>> from pytorch3d.structures import Meshes
>>> from pytorch3d import _C
>>> import sys
>>> sys.path
['', 'E:\\miniconda\\envs\\fp\\python39.zip', 'E:\\miniconda\\envs\\fp\\DLLs', 'E:\\miniconda\\envs\\fp\\lib', 'E:\\miniconda\\envs\\fp', 'E:\\miniconda\\envs\\fp\\lib\\site-packages', 'E:\\miniconda\\envs\\fp\\lib\\site-packages\\nvdiffrast-0.3.3-py3.9.egg', 'E:\\miniconda\\envs\\fp\\lib\\site-packages\\pytorch3d-0.7.7-py3.9-win-amd64.egg', 'E:\\miniconda\\envs\\fp\\lib\\site-packages\\setuptools\\_vendor', 'E:\\miniconda\\envs\\fp\\lib\\site-packages\\win32', 'E:\\miniconda\\envs\\fp\\lib\\site-packages\\win32\\lib', 'E:\\miniconda\\envs\\fp\\lib\\site-packages\\Pythonwin']
>>>
Does anybody know whats wrong with this?
Basic Environment
Windows 11
Visual Studio 2019 Developer Command Prompt v16.11.32
Note that _C is a private part of pytorch3d. It is not meant to be imported directly by users. The "problem" you report is not a bug.
What is going on here is that the binary extension _C will only work if certain binary components of pytorch have already been loaded. The line from pytorch3d import _C will work after import torch has been run. PyTorch3D itself should not have any files which import _C without first importing torch.
Question Description
I installed pytorch3d==0.7.7 on Windows succeed,but when I try to use it I met an intresting problem like this:
If I
from pytorch3d import _C
it will get wrong, BUT if I 'from pytorch3d.structures import Meshes' first and thenfrom pytorch3d import _C
it will be right.Does anybody know whats wrong with this?
Basic Environment
PS: I'd try this method #1013 (comment), it doesn't work.
The text was updated successfully, but these errors were encountered: