-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Inability to install pytorch3d due to torch not found #1673
Comments
Meanwhile, the pip install works fine:
The problem is, I want to use poetry, not pip, and in that case, I am running into the aforementioned ModuleNotFound error |
I think poetry might be deliberately not (yet) designed to deal with packages like PyTorch3D which have tight build time dependencies on versions of other packages. So it might be "by design" that this doesn't work easily. If that's not the case, we'd like help, e.g. pointers to documentation. If it is possible to adapt PyTorch3D nicely into poetry, it hasn't been done. |
Thank you for your reply @bottler . It seems that this issue is essentially a duplicate of #1419, as torch is a build-time dependency of the library, but it is not declared in a pyproject.toml file, hence poetry has no way to include it in build time. As such, it seems to be not possible to install this package with poetry :/ |
🐛 Bugs / Unexpected behaviors
Versions
Python: 3.8.10
OS: Ubuntu 20.04.5 LTS
Poetry: 1.6.1
pip: 23.2.1
Description
I am trying to set up a poetry environment with this library installed. I started off with a completely new, empty environment. Then I attempted to add the
poetry3d
package:poetry add -vvv git+https://github.com/facebookresearch/pytorch3d.git
Instead of adding it to the poetry environment, I got the following error:
Alright, so
pytorch3d
has a dependency ontorch
but despite this pre-requisite, the installation for some reason doesn't install the dependency. So I went ahead and installedtorch
:poetry add torch
Which went successfully. Now I retried the previous installation command, knowing that torch is certainly included in my environment by now:
poetry add -vvv git+https://github.com/facebookresearch/pytorch3d.git
But the error is exactly the same.
Edit 1
I saw this issue from earlier: #1619. But it doesn't offer a clear workaround on how to install pytorch3d with poetry. As I mentioned above, I also installed
torch
separately before attempting to installpytorch3d
, but the installation still fails, aspytorch3d
somehow doesn't see the already presenttorch
dependency in the local venv.Edit 2
I also came across this: #1479 . I assume this change would solve the issue, but it seems to have been never merged for some reason.
The text was updated successfully, but these errors were encountered: