kwea123 / nerf_pl

NeRF (Neural Radiance Fields) and NeRF in the Wild using pytorch-lightning
https://www.youtube.com/playlist?list=PLDV2CyUo4q-K02pNEyDr7DYpTQuka3mbV
MIT License
2.71k stars 477 forks source link

nerf colab run with error #202

Open JianingHe0115 opened 1 year ago

JianingHe0115 commented 1 year ago

When I run the in installation part of the nerf in colab, there are some error about the torch version.

Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/ ERROR: Could not find a version that satisfies the requirement torch==1.4.0 (from versions: 1.7.1, 1.8.0, 1.8.1, 1.9.0, 1.9.1, 1.10.0, 1.10.1, 1.10.2, 1.11.0, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 2.0.0) ERROR: No matching distribution found for torch==1.4.0

And I change the torch version, there are some error about training part: /content/nerf_pl Traceback (most recent call last): File "/content/nerf_pl/train.py", line 7, in from datasets import dataset_dict File "/content/nerf_pl/datasets/init.py", line 1, in from .blender import BlenderDataset File "/content/nerf_pl/datasets/blender.py", line 9, in from .ray_utils import File "/content/nerf_pl/datasets/ray_utils.py", line 2, in from kornia import create_meshgrid File "/usr/local/lib/python3.9/dist-packages/kornia/init.py", line 12, in from kornia import augmentation File "/usr/local/lib/python3.9/dist-packages/kornia/augmentation/init.py", line 1, in from .augmentation import File "/usr/local/lib/python3.9/dist-packages/kornia/augmentation/augmentation.py", line 7, in from . import functional as F File "/usr/local/lib/python3.9/dist-packages/kornia/augmentation/functional.py", line 488 input = input.view((-1, (*input.shape[-3:]))) ^ SyntaxError: can't use starred expression here

ichsan2895 commented 1 year ago

AFAIK, I think torch <= 1.6 doesn't support in python 3.9. Google colab uses python 3.9. So, my suggestion is using torch that supported by python 3.9, but please don't use torch 2.0 since some dependencies don't compatible with it.

CUTEPKQ commented 1 year ago

before git clone, use the command ! sudo update-alternatives --config python3 then, select the python3.8