tatsy / torchmcubes

Marching cubes implementation for PyTorch environment.
Mozilla Public License 2.0
204 stars 39 forks source link

Could not build wheels for torchmcubes #14

Closed VeeVal closed 3 months ago

VeeVal commented 7 months ago

I'm trying to install torchmcubes but I just can't get it to install

this is the log of what I'm getting

Collecting git+https://github.com/tatsy/torchmcubes.git
  Cloning https://github.com/tatsy/torchmcubes.git to c:\users\v\appdata\local\temp\pip-req-build-02pr5nlq
  Running command git clone --filter=blob:none --quiet https://github.com/tatsy/torchmcubes.git 'C:\Users\V\AppData\Local\Temp\pip-req-build-02pr5nlq'
  Resolved https://github.com/tatsy/torchmcubes.git to commit 3aef8afa5f21b113afc4f4ea148baee850cbd472
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: torchmcubes
  Building wheel for torchmcubes (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [24 lines of output]
      running bdist_wheel
      C:\Users\V\AppData\Local\Programs\Python\Python311\Lib\site-packages\torch\utils\cpp_extension.py:500: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
        warnings.warn(msg.format('we could not find ninja.'))
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-311
      creating build\lib.win-amd64-cpython-311\torchmcubes
      copying torchmcubes\__init__.py -> build\lib.win-amd64-cpython-311\torchmcubes
      running build_ext
      C:\Users\V\AppData\Local\Programs\Python\Python311\Lib\site-packages\torch\utils\cpp_extension.py:381: UserWarning: Error checking compiler version for cl: [WinError 2] The system cannot find the file specified
        warnings.warn(f'Error checking compiler version for {compiler}: {error}')
      C:\Users\V\AppData\Local\Programs\Python\Python311\Lib\site-packages\torch\utils\cpp_extension.py:415: UserWarning: The detected CUDA version (12.4) has a minor version mismatch with the version that was used to compile PyTorch (12.1). Most likely this shouldn't be a problem.
        warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
      building 'torchmcubes_module' extension
      CUDA environment was not successfully loaded!
      Build only CPU module!
      running bdist_wheel
      running build
      running build_py
      copying torchmcubes\__init__.py -> build\lib.win-amd64-cpython-311\torchmcubes
      running build_ext
      building 'torchmcubes_module' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for torchmcubes
  Running setup.py clean for torchmcubes
Failed to build torchmcubes
ERROR: Could not build wheels for torchmcubes, which is required to install pyproject.toml-based projects
CCRay10 commented 5 months ago

Same question

Dont-look-at-me commented 4 months ago

Same

LeeYunhang commented 4 months ago

Same

poptree commented 4 months ago

Trying the following commands:


pip install git+https://github.com/tatsy/torchmcubes.git@3aef8afa5f21b113afc4f4ea148baee850cbd472 

It seems like the author made some modifications to the configuration of poetry, which led to this issue. I am not an expert on poetry but rolling back to the previous version works well for me.

tatsy commented 3 months ago

I recently updated the library, and I hope this fixes the problem for you all. If the problem still lasts, please kindly let me know.

Victor1221diz commented 3 months ago

I'm still getting the same isuse

tatsy commented 3 months ago

@Victor1221diz That's a bit strange, because, previously, the import error for "torch" is due to "setup.py", but currently, this library does not use "setup.py" at all. Maybe, something is wrong on your side if you are sure that the problem is the same as the one discussed in this issue.

Can you elaborate on your problem (like posting the error messages, python and torch versions)?

tatsy commented 3 months ago

I think the problem has been resolved by the latest commit. Thank you all for your reports.

xlfkeer commented 3 months ago

尝试以下命令:

pip install git+https://github.com/tatsy/torchmcubes.git@3aef8afa5f21b113afc4f4ea148baee850cbd472 

似乎作者对诗歌的配置做了一些修改,导致了这个问题。我不是诗歌专家,但回滚到以前的版本对我来说效果很好。

这个对我有效,我成功编译。

Imyamoe commented 1 month ago

I recently updated the library, and I hope this fixes the problem for you all. If the problem still lasts, please kindly let me know.

Still getting this error. But the earlier version mentioned by @poptree installed with no issues

Edited: But I keep getting errors upon trying to use it with TripoSR