princeton-vl / infinigen

Infinite Photorealistic Worlds using Procedural Generation
https://infinigen.org
BSD 3-Clause "New" or "Revised" License
5.31k stars 453 forks source link

Cannot import bnurbs from cpp_utils. #54

Open MitchD42 opened 1 year ago

MitchD42 commented 1 year ago

When trying to run the Hello World sample I hit an error where blender can't import bnurbs from the cpp_utils folder. I had a theory that it was because the bnurbs file was a .pyx file so I converted the file from Cython to Python and tried to run it again. Now I think I've really broke it. The new error is that numpy has no attribute 'bool'.

I am heavily relying on ChatGPT for any coding so bear in mind I am no programmer.

This happens every time I try to run: blender -noaudio --background --python generate.py -- --seed 0 --task coarse -g desert simple --output_folder outputs/helloworld/coarse

Blender quit


** (If this is your first time running Infinigen) What are the full output logs of `install.sh` ?**

I'm not sure how to find these as I've opened and closed my WSL a couple times.



**Platform**
- OS & OS Version: Windows 11 - Version 10.0.22621 Build 22621
- GPU (?) : NVIDIA GeForce RTX 2080 Ti
- GPU Driver Version (?) : 31.0.15.2824
- RAM (GB): 12 GB

**Additional context**
I'm running:
- Windows Subsystem for Linux
- Python3
MitchD42 commented 1 year ago

This was the original error before I tried to edit the bnurbs.pyx file:

Color management: using fallback mode for management Color management: Error could not find role data role. Blender 3.0.1 Color management: scene view "Filmic" not found, setting default "Standard". /run/user/1000/gvfs/ non-existent directory Traceback (most recent call last): File "/mnt/c/gitstuff/infinigen/worldgen/generate.py", line 27, in <module> from terrain import Terrain File "/mnt/c/gitstuff/infinigen/worldgen/terrain/__init__.py", line 7, in <module> from .core import Terrain File "/mnt/c/gitstuff/infinigen/worldgen/terrain/core.py", line 15, in <module> from terrain.mesher import OpaqueSphericalMesher, TransparentSphericalMesher, UniformMesher File "/mnt/c/gitstuff/infinigen/worldgen/terrain/mesher/__init__.py", line 7, in <module> from .uniform_mesher import UniformMesher File "/mnt/c/gitstuff/infinigen/worldgen/terrain/mesher/uniform_mesher.py", line 12, in <module> from terrain.utils import ASDOUBLE, ASINT, Mesh File "/mnt/c/gitstuff/infinigen/worldgen/terrain/utils/__init__.py", line 7, in <module> from .mesh import Mesh, write_attributes, Vars, move_modifier File "/mnt/c/gitstuff/infinigen/worldgen/terrain/utils/mesh.py", line 18, in <module> from .camera import getK File "/mnt/c/gitstuff/infinigen/worldgen/terrain/utils/camera.py", line 10, in <module> from placement.camera import get_camera File "/mnt/c/gitstuff/infinigen/worldgen/placement/camera.py", line 36, in <module> from . import animation_policy File "/mnt/c/gitstuff/infinigen/worldgen/placement/animation_policy.py", line 20, in <module> from assets.creatures.geometry.curve import Curve File "/mnt/c/gitstuff/infinigen/worldgen/assets/creatures/__init__.py", line 1, in <module> from .genomes.beetle import BeetleFactory, AntSwarmFactory File "/mnt/c/gitstuff/infinigen/worldgen/assets/creatures/genomes/beetle.py", line 17, in <module> from assets.creatures import parts File "/mnt/c/gitstuff/infinigen/worldgen/assets/creatures/parts/__init__.py", line 1, in <module> from . import body, foot, wings, leg, head, \ File "/mnt/c/gitstuff/infinigen/worldgen/assets/creatures/parts/body.py", line 11, in <module> from assets.creatures.creature import Part, PartFactory File "/mnt/c/gitstuff/infinigen/worldgen/assets/creatures/creature.py", line 19, in <module> from assets.creatures.geometry import lofting, skin_ops File "/mnt/c/gitstuff/infinigen/worldgen/assets/creatures/geometry/lofting.py", line 17, in <module> from .nurbs import nurbs File "/mnt/c/gitstuff/infinigen/worldgen/assets/creatures/geometry/nurbs.py", line 17, in <module> from .cpp_utils import bnurbs ImportError: cannot import name 'bnurbs' from 'assets.creatures.geometry.cpp_utils' (unknown location)

pyh007 commented 1 year ago

解决了吗 我也遇到了同样的问题

MitchD42 commented 1 year ago

解决了吗 我也遇到了同样的问题

Not yet, I'm swamped this weekend but I'll update if I find a solution.

louis-fashion-ai commented 1 year ago

You can cd "/opt/infinigen/worldgen/assets/creatures/geometry/cpp_utils", and "python setup_linux.py build_ext --inplace"

araistrick commented 1 year ago

Hello, I recommend @louis-fashion-ai 's solution, cd-ing into that folder and rerunning the relevant setup.py should re-attempt installation, and/or show some error message as to why it is not able to cythonize the bnurbs module. If this doesn't resolve the issue, then it may get fixed in 1.1 in a few weeks, as I have reworked installation quite a bit.