torch-points3d / torch-points-kernels

Pytorch kernels for spatial operations on point clouds
MIT License
96 stars 25 forks source link

ERROR: Failed building wheel for torch-points-kernels #82

Closed ziyang1106 closed 3 years ago

ziyang1106 commented 3 years ago

Hi, I have a problem installing torch-points-kernels

os: windows 10 python: 3.8 torch: 1.9.1+cu102 cuda: 10.2


Collecting torch-points-kernels
  Using cached torch-points-kernels-0.7.0.tar.gz (44 kB)
Requirement already satisfied: torch>=1.1.0 in c:\users\mac\appdata\roaming\python\python38\site-packages (from torch-points-kernels) (1.9.1+cu102)
Requirement already satisfied: numba in c:\programdata\anaconda3\lib\site-packages (from torch-points-kernels) (0.53.1)
Requirement already satisfied: numpy<1.20 in c:\programdata\anaconda3\lib\site-packages (from torch-points-kernels) (1.19.5)
Requirement already satisfied: scikit-learn in c:\programdata\anaconda3\lib\site-packages (from torch-points-kernels) (0.24.1)
Requirement already satisfied: typing-extensions in c:\programdata\anaconda3\lib\site-packages (from torch>=1.1.0->torch-points-kernels) (3.7.4.3)
Requirement already satisfied: setuptools in c:\users\mac\appdata\roaming\python\python38\site-packages (from numba->torch-points-kernels) (58.2.0)
Requirement already satisfied: llvmlite<0.37,>=0.36.0rc1 in c:\programdata\anaconda3\lib\site-packages (from numba->torch-points-kernels) (0.36.0)
Requirement already satisfied: scipy>=0.19.1 in c:\programdata\anaconda3\lib\site-packages (from scikit-learn->torch-points-kernels) (1.6.2)
Requirement already satisfied: threadpoolctl>=2.0.0 in c:\programdata\anaconda3\lib\site-packages (from scikit-learn->torch-points-kernels) (2.1.0)
Requirement already satisfied: joblib>=0.11 in c:\programdata\anaconda3\lib\site-packages (from scikit-learn->torch-points-kernels) (1.0.1)
Building wheels for collected packages: torch-points-kernels
  Building wheel for torch-points-kernels (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Mac\\AppData\\Local\\Temp\\pip-install-daj3vjag\\torch-points-kernels_13394f8421bb46d1a01a43372a63b313\\setup.py'"'"'; __file__='"'"'C:\\Users\\Mac\\AppData\\Local\\Temp\\pip-install-daj3vjag\\torch-points-kernels_13394f8421bb46d1a01a43372a63b313\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Mac\AppData\Local\Temp\pip-wheel-wa5vj41f'
       cwd: C:\Users\Mac\AppData\Local\Temp\pip-install-daj3vjag\torch-points-kernels_13394f8421bb46d1a01a43372a63b313\
  Complete output (22 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.8
  creating build\lib.win-amd64-3.8\torch_points_kernels
  copying torch_points_kernels\chamfer_dist.py -> build\lib.win-amd64-3.8\torch_points_kernels
  copying torch_points_kernels\cluster.py -> build\lib.win-amd64-3.8\torch_points_kernels
  copying torch_points_kernels\cubic_feature_sampling.py -> build\lib.win-amd64-3.8\torch_points_kernels
  copying torch_points_kernels\gridding.py -> build\lib.win-amd64-3.8\torch_points_kernels
  copying torch_points_kernels\knn.py -> build\lib.win-amd64-3.8\torch_points_kernels
  copying torch_points_kernels\metrics.py -> build\lib.win-amd64-3.8\torch_points_kernels
  copying torch_points_kernels\torchpoints.py -> build\lib.win-amd64-3.8\torch_points_kernels
  copying torch_points_kernels\__init__.py -> build\lib.win-amd64-3.8\torch_points_kernels
  running build_ext
  building 'torch_points_kernels.points_cuda' 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/
  Error in atexit._run_exitfuncs:
  Traceback (most recent call last):
    File "C:\ProgramData\Anaconda3\lib\site-packages\colorama\ansitowin32.py", line 59, in closed
      return stream.closed
  ValueError: underlying buffer has been detached
  ----------------------------------------
  ERROR: Failed building wheel for torch-points-kernels
  Running setup.py clean for torch-points-kernels
Failed to build torch-points-kernels
Installing collected packages: torch-points-kernels
    Running setup.py install for torch-points-kernels ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Mac\\AppData\\Local\\Temp\\pip-install-daj3vjag\\torch-points-kernels_13394f8421bb46d1a01a43372a63b313\\setup.py'"'"'; __file__='"'"'C:\\Users\\Mac\\AppData\\Local\\Temp\\pip-install-daj3vjag\\torch-points-kernels_13394f8421bb46d1a01a43372a63b313\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Mac\AppData\Local\Temp\pip-record-d5yt1w01\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\ProgramData\Anaconda3\Include\torch-points-kernels'
         cwd: C:\Users\Mac\AppData\Local\Temp\pip-install-daj3vjag\torch-points-kernels_13394f8421bb46d1a01a43372a63b313\
    Complete output (22 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.8
    creating build\lib.win-amd64-3.8\torch_points_kernels
    copying torch_points_kernels\chamfer_dist.py -> build\lib.win-amd64-3.8\torch_points_kernels
    copying torch_points_kernels\cluster.py -> build\lib.win-amd64-3.8\torch_points_kernels
    copying torch_points_kernels\cubic_feature_sampling.py -> build\lib.win-amd64-3.8\torch_points_kernels
    copying torch_points_kernels\gridding.py -> build\lib.win-amd64-3.8\torch_points_kernels
    copying torch_points_kernels\knn.py -> build\lib.win-amd64-3.8\torch_points_kernels
    copying torch_points_kernels\metrics.py -> build\lib.win-amd64-3.8\torch_points_kernels
    copying torch_points_kernels\torchpoints.py -> build\lib.win-amd64-3.8\torch_points_kernels
    copying torch_points_kernels\__init__.py -> build\lib.win-amd64-3.8\torch_points_kernels
    running build_ext
    building 'torch_points_kernels.points_cuda' 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/
    Error in atexit._run_exitfuncs:
    Traceback (most recent call last):
      File "C:\ProgramData\Anaconda3\lib\site-packages\colorama\ansitowin32.py", line 59, in closed
        return stream.closed
    ValueError: underlying buffer has been detached
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Mac\\AppData\\Local\\Temp\\pip-install-daj3vjag\\torch-points-kernels_13394f8421bb46d1a01a43372a63b313\\setup.py'"'"'; __file__='"'"'C:\\Users\\Mac\\AppData\\Local\\Temp\\pip-install-daj3vjag\\torch-points-kernels_13394f8421bb46d1a01a43372a63b313\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Mac\AppData\Local\Temp\pip-record-d5yt1w01\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\ProgramData\Anaconda3\Include\torch-points-kernels' Check the logs for full command output.`

The error appears at 'Failed building wheel for torch-points-kernels' and it tips 'Microsoft Visual C++ 14.0 or greater is required'. However, I have installed the latest Microsoft C++ Build Tools. But somehow it still reports this error. I wonder if you have come across the same problem before and how you solve it.

Moreover, if this problem remains unsolved, may i ask you for the .whl files in order to skip 'building wheels' part?

ziyang1106 commented 3 years ago

After reinstall my local system, the problem is no more exist.

Highly recommend those who encounter the same issue as me search the error sentence on STACKOVERFLOW, lots of solutions out there though none of them work for me. Hope it helps for you.