tiny-cuda-nn icon indicating copy to clipboard operation
tiny-cuda-nn copied to clipboard

ImportError: DLL load failed while importing _89_C: 找不到指定的模块。

Open aftermath0703 opened this issue 2 years ago • 1 comments

Detailed error information is as follows:

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ E:\projects\Make-It-3D\main.py:118 in <module>                                                   │
│                                                                                                  │
│   115 │   if opt.backbone == 'vanilla':                                                          │
│   116 │   │   from nerf.network import NeRFNetwork                                               │
│   117 │   elif opt.backbone == 'tcnn':                                                           │
│ ❱ 118 │   │   from nerf.network_tcnn import NeRFNetwork                                          │
│   119 │   else:                                                                                  │
│   120 │   │   raise NotImplementedError(f'--backbone {opt.backbone} is not implemented!')        │
│   121                                                                                            │
│                                                                                                  │
│ E:\projects\Make-It-3D\nerf\network_tcnn.py:10 in <module>                                       │
│                                                                                                  │
│     7 from encoding import get_encoder                                                           │
│     8                                                                                            │
│     9 import numpy as np                                                                         │
│ ❱  10 import tinycudann as tcnn                                                                  │
│    11 from .utils import safe_normalize                                                          │
│    12                                                                                            │
│    13 class MLP(nn.Module):                                                                      │
│                                                                                                  │
│ E:\projects\Make-It-3D\venv\lib\site-packages\tinycudann\__init__.py:9 in <module>               │
│                                                                                                  │
│    6 # distribution of this software and related documentation without an express                │
│    7 # license agreement from NVIDIA CORPORATION is strictly prohibited.                         │
│    8                                                                                             │
│ ❱  9 from tinycudann.modules import free_temporary_memory, NetworkWithInputEncoding, Network,    │
│   10                                                                                             │
│   11 __all__ = ["free_temporary_memory", "NetworkWithInputEncoding", "Network", "Encoding"]      │
│   12                                                                                             │
│                                                                                                  │
│ E:\projects\Make-It-3D\venv\lib\site-packages\tinycudann\modules.py:51 in <module>               │
│                                                                                                  │
│    48 │   │   continue                                                                           │
│    49 │                                                                                          │
│    50 │   try:                                                                                   │
│ ❱  51 │   │   _C = importlib.import_module(f"tinycudann_bindings._{cc}_C")                       │
│    52 │   │   if cc != system_compute_capability:                                                │
│    53 │   │   │   warnings.warn(f"tinycudann was built for lower compute capability ({cc}) tha   │
│                                                                                                  │
│ D:\Python\Python310\lib\importlib\__init__.py:126 in import_module                               │
│                                                                                                  │
│   123 │   │   │   if character != '.':                                                           │
│   124 │   │   │   │   break                                                                      │
│   125 │   │   │   level += 1                                                                     │
│ ❱ 126 │   return _bootstrap._gcd_import(name[level:], package, level)                            │
│   127                                                                                            │
│   129 _RELOADING = {}                                                                            │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ImportError: DLL load failed while importing _89_C: 找不到指定的模块。

my attempt

I refer to the solution in this document:https://docs.nerf.studio/en/latest/quickstart/installation.html Reinstall tiny-cuda-nn with the following command:

pip uninstall tinycudann 
set TCNN_CUDA_ARCHITECTURES=89
pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch

but it doesn't work The console output is as follows

(venv) PS E:\projects\Make-It-3D> pip uninstall tinycudann                                                                                                                                     
Found existing installation: tinycudann 1.7
Uninstalling tinycudann-1.7:
  Would remove:
    e:\projects\make-it-3d\venv\lib\site-packages\tinycudann\*
    e:\projects\make-it-3d\venv\lib\site-packages\tinycudann_bindings\_89_c.cp310-win_amd64.pyd
Proceed (Y/n)? y
  Successfully uninstalled tinycudann-1.7
(venv) PS E:\projects\Make-It-3D> set TCNN_CUDA_ARCHITECTURES=89;pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch
Collecting git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch
  Cloning https://github.com/NVlabs/tiny-cuda-nn/ to c:\users\dragon\appdata\local\temp\pip-req-build-6uyfeuig
  Running command git clone --filter=blob:none -q https://github.com/NVlabs/tiny-cuda-nn/ 'C:\Users\dragon\AppData\Local\Temp\pip-req-build-6uyfeuig'
  Resolved https://github.com/NVlabs/tiny-cuda-nn/ to commit 28ca991f99b44d10387d73077c07ccfdd7f96275
  Running command git submodule update --init --recursive -q
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: tinycudann
  Building wheel for tinycudann (setup.py) ... done
  Created wheel for tinycudann: filename=tinycudann-1.7-cp310-cp310-win_amd64.whl size=24725519 sha256=9068e54f2a3bb788fe440e5c7e587f1c74c34eaab6122cdcfcc9f9b8ebdbbde1
  Stored in directory: C:\Users\dragon\AppData\Local\Temp\pip-ephem-wheel-cache-rwczdmwj\wheels\32\d8\5e\dc94eca0794af9e09a6d97f19cf15dfe9bbbc4d56ae4db4aa2
Successfully built tinycudann
Installing collected packages: tinycudann
Successfully installed tinycudann-1.7

Device Information

cuda:12.1.1 GPU:NVIDIA GeForce RTX 4090

how can I resolve it

aftermath0703 avatar Jul 27 '23 10:07 aftermath0703

Have you solved it? Thank you

ShunkaiZhou avatar May 15 '24 16:05 ShunkaiZhou