Description
🐛 Bugs / Unexpected behaviors
I can install pytorch3d locally (in a fresh pip env (edit: provided by conda, important later)) if I do this:
pip install torch==2.2.0
pip install git+https://github.com/facebookresearch/pytorch3d.git@f34104cf6ebefacd7b7e07955ee7aaa823e616ac
However the same operations fail when run in the context of a Github action:
File "/tmp/pip-build-env-1a4p2xfk/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 15, in <module>
ModuleNotFoundError: No module named 'torch'
Instructions To Reproduce the Issue:
Put the following in .github/workflows as a .yaml file (and change the branch name if necessary):
name: Test Pytorch3d
on:
push:
branches: [ dev ]
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install pytorch3d
run: |
pip install torch==2.2.0
pip install git+https://github.com/facebookresearch/pytorch3d.git@f34104cf6ebefacd7b7e07955ee7aaa823e616ac
Links:
Failing action .yaml
Failed run
Even though I install torch first, and then pytorch3d, pytorch3d's setup can't find torch. It doesn't matter if I install them in the same command either.
This seems related to #1673 and #1419 which prevents PyTorch3D from being installed under Poetry due to the installer expecting torch to be present but no mention of the dependency being found in the package info.
Every other combination that I've tried including Pytorch3d fails; I'm not sure how to work around this short of forking pytorch3d and inserting a dependency on torch to keep pip from getting confused.