ayaanzhaque / instruct-nerf2nerf

Instruct-NeRF2NeRF: Editing 3D Scenes with Instructions (ICCV 2023)
https://instruct-nerf2nerf.github.io/
MIT License
769 stars 64 forks source link

A module missing when installing with "pip install git+...." #4

Closed Xallt closed 1 year ago

Xallt commented 1 year ago

When I install using the command pip install git+https://github.com/ayaanzhaque/instruct-nerf2nerf Then when I run ns-train -h I get this error

Traceback (most recent call last):
  File "/home/dmitry/.miniconda3/envs/nerfstudio/bin/ns-train", line 5, in <module>
    from scripts.train import entrypoint
  File "/home/dmitry/.miniconda3/envs/nerfstudio/lib/python3.8/site-packages/scripts/train.py", line 49, in <module>
    from nerfstudio.configs.method_configs import AnnotatedBaseConfigUnion
  File "/home/dmitry/.miniconda3/envs/nerfstudio/lib/python3.8/site-packages/nerfstudio/configs/method_configs.py", line 433, in <module>
    external_methods, external_descriptions = discover_methods()
  File "/home/dmitry/.miniconda3/envs/nerfstudio/lib/python3.8/site-packages/nerfstudio/plugins/registry.py", line 42, in discover_methods
    specification = discovered_entry_points[name].load()
  File "/home/dmitry/.miniconda3/envs/nerfstudio/lib/python3.8/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 194, in load
    module = import_module(match.group('module'))
  File "/home/dmitry/.miniconda3/envs/nerfstudio/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/home/dmitry/.miniconda3/envs/nerfstudio/lib/python3.8/site-packages/in2n/in2n_config.py", line 25, in <module>
    from in2n.data.in2n_datamanager import InstructNeRF2NeRFDataManagerConfig
ModuleNotFoundError: No module named 'in2n.data'

But if I clone the repo and install it with pip install -e . then no error occurs

alievrusik commented 1 year ago

I have the same error.

It appears when I call ns-train in2n --help or ns-train -h.

Pashtetickus commented 1 year ago

I installed nerfstudio in docker, then encountered the same problem, but it was just the wrong command - try doing python3.10 -m pip install ... for example in docker. Or just check if your nerfstudio env is configured correctly.

alievrusik commented 1 year ago

Update: this bug appers when I install via command pip install git+https://github.com/ayaanzhaque/instruct-nerf2nerf

if I install via this command:

git clone https://github.com/ayaanzhaque/instruct-nerf2nerf.git
cd instruct-nerf2nerf
pip install --upgrade pip setuptools
pip install -e .

everything works fine.

alievrusik commented 1 year ago

@Pashtetickus thank you for advice!

ayaanzhaque commented 1 year ago

Hello everyone,

I apologize for the error with the pip install. It was due to the fact that the datamanager file was in the data folder, but in reality there is no need for this other than organization. I have moved the datamanager file to the same root as the rest of the files, and now the pip install should work. Please try it and let me know.

However, if you ever want to edit the code yourself, I do recommend cloning the repo and installing from there.