facebookresearch / pytorch3d

PyTorch3D is FAIR's library of reusable components for deep learning with 3D data
https://pytorch3d.org/
Other
8.7k stars 1.3k forks source link

from pytorch3d import _C ImportError: cannot import name '_C' from 'pytorch3d' (unknown location) #1629

Closed tyq996 closed 4 months ago

tyq996 commented 1 year ago

cuda10.1+python3.8+torch1.8.0 I download the zip file directly to my conda env, but there is no _C for pytorch3d, what's wrong with it?

bottler commented 1 year ago

What do you mean "download the zip file"? To install PyTorch, please follow the instructions in INSTALL.md. This will involve official install commands, which will either build a binary _C file or download a package containing one.

511lyf commented 4 months ago

cuda10.1+python3.8+torch1.8.0 我将 zip 文件直接下载到我的 conda env,但是 pytorch3d 没有_C,这是怎么回事?

Hello, did you finally solve the problem? Can you help me see what the problem is? I have the same problem. I installed it using Pytorch3D-0.7.6 +pt2.1.0cu121-cp38-cp38-win_amd64.whl, which can import pytorch3d correctly, but I cannot find the _C module, so I urgently seek help

bottler commented 4 months ago

@511lyf Once more - please do not sidetrack issues. (This issue seems may be abandoned.)

LeeKeyu commented 3 months ago

I have the same problem using conda install pytorch3d -c conda-forge. Then when I run import pytorch.ops, it reports the error that _C is missing. I once solved this problem by installing from a local clone as "pip install -e ." but at this time it just stucks until cancelling. Can anybody help?

511lyf commented 3 months ago

我在使用时遇到同样的问题 然后,当我运行时,它会报告缺少_C的错误。我曾经通过从本地克隆安装为“pip install -e ”解决了这个问题,但此时它只是卡住了,直到取消。谁能帮忙?conda install pytorch3d -c conda-forge.``import pytorch.ops

I used whl file to download pytorch3d directly, just need to keep the version consistent with your cuda and other Settings, it can be used normally. If you have any other questions, you can add my wechat zwz_0511, I can provide the method I use, I hope it can help you

LeeKeyu commented 3 months ago

我在使用时遇到同样的问题 然后,当我运行时,它会报告缺少_C的错误。我曾经通过从本地克隆安装为“pip install -e ”解决了这个问题,但此时它只是卡住了,直到取消。谁能帮忙?conda install pytorch3d -c conda-forge.import pytorch.ops ``

I used whl file to download pytorch3d directly, just need to keep the version consistent with your cuda and other Settings, it can be used normally. If you have any other questions, you can add my wechat zwz_0511, I can provide the method I use, I hope it can help you

Thanks for your suggestion but the wheel provided by INSTALL.md did not suit my environment (cuda 12.1, python 3.10, pytorch 2.2.0). I have re-downloaded the package and tried pip install -e. and it finnally works after waiting for a long time...