3DTopia / 3DTopia-XL

3DTopia-XL: High-Quality 3D PBR Asset Generation via Primitive Diffusion
https://3dtopia.github.io/3DTopia-XL/
986 stars 24 forks source link

ModuleNotFoundError: No module named 'mvpraymarchlib' #4

Closed Limbicnation closed 1 month ago

Limbicnation commented 1 month ago

I'm encountering an issue while trying to install this project on Windows Subsystem for Linux (WSL). When I run the command bash install.sh, it fails. Here are the error messages I'm seeing:

FAILED: /home//GitHub/3DTopia-XL/dva/mvp/extensions/utils/build/temp.linux-x86_64-cpython-39/utils_kernel.o

GitHub/3DTopia-XL/dva/mvp/extensions/utils/build/temp.linux-x86_64-cpython-39/utils_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -arch=sm_70 -std=c++14 -lineinfo -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=utilslib -D_GLIBCXX_USE_CXX11_ABI=0 /usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’: 435 | function(_Functor&& __f) | ^ /usr/include/c++/11/bits/std_function.h:435:145: note: ‘_ArgTypes’ /usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’: 530 | operator=(_Functor&& __f) | ^ /usr/include/c++/11/bits/std_function.h:530:146: note: ‘_ArgTypes’ ninja: build stopped: subcommand failed. Traceback (most recent call last): File "/home//miniconda3/envs/primx/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 2100, in _run_ninja_build subprocess.run( File "/home//miniconda3/envs/primx/lib/python3.9/subprocess.py", line 528, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

Thanks!

Limbicnation commented 1 month ago

Probably my CUDA is outdated :(

nvcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2021 NVIDIA Corporation Built on Thu_Nov_18_09:45:30_PST_2021 Cuda compilation tools, release 11.5, V11.5.119 Build cuda_11.5.r11.5/compiler.30672275_0

FrozenBurning commented 1 month ago

Yes, the CUDA driver might be one of the reasons for this issue, which would be better consistent with the dependency of your current pytorch. It would be a great idea to double-check your GCC compiler is also not too outdated.

Kindly let me know if you have any further issue with more detailed logs. Thanks!

Limbicnation commented 1 month ago

Thank you for the response! I’ve installed CUDA 11.8 with Conda. However, I’m now encountering another issue:

RuntimeError: Numpy is not available

Any advice would be appreciated!

Limbicnation commented 1 month ago

I'm still encountering the same error on WSL:

RuntimeError: Numpy is not available

Any suggestions @FrozenBurning ?

gcc --version gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

nvcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2022 NVIDIA Corporation Built on Wed_Sep_21_10:33:58_PDT_2022 Cuda compilation tools, release 11.8, V11.8.89 Build cuda_11.8.r11.8/compiler.31833905_0

Limbicnation commented 1 month ago

I was able to resolve the issue by running:

pip uninstall numpy
pip install numpy==1.23.5
andybak commented 1 month ago

The underlying problem is the lack of version numbers in requirements.txt: https://github.com/3DTopia/3DTopia-XL/blob/main/requirements.txt

Unless there's a overriding reason not to then every entry should be versioned - otherwise the chances of people successfully installing this will drop to zero over time.

DanielBoxer commented 1 month ago

Hi @Limbicnation, I'm also trying to install this on WSL and running into similar CUDA errors. Could you share the steps you used to install CUDA 11.8 with conda? And did you manage to get it working in the end? Thanks a lot!

Limbicnation commented 1 month ago

Hi @andybak andybak,

I've set up my conda environment and installed cuda using the following command:

conda install nvidia/label/cuda-11.8.0::cuda

andybak commented 1 month ago

Hi @andybak andybak,

I've set up my conda environment and installed cuda using the following command:

conda install nvidia/label/cuda-11.8.0::cuda

Hi - My point was more about future-proofing and best-practice. The installation instructions use requirements.txt but requirements.txt doesn't specified versions for all the packages. This is almost guaranteed to break sooner rather than later.

Limbicnation commented 1 month ago

@andybak Hi, understood! I haven't made any changes to the requirements.txt file, so the version numbers will remain as specified or default to what's defined there.