Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running into simple-knn issue when setting up environment.yml #373

Open
reachomk opened this issue Oct 22, 2023 · 15 comments
Open

Running into simple-knn issue when setting up environment.yml #373

reachomk opened this issue Oct 22, 2023 · 15 comments

Comments

@reachomk
Copy link

Hi,

I'm running into the following error when running:

conda env create --file environment.yml

Restarting and trying again did not fix the issue.

`note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> simple-knn

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

failed

CondaEnvException: Pip failed`

@jjpatino-byte
Copy link

I got that error too... Could you solve it?

@boblaublaw
Copy link

the simple-knn submodule is supplied by another repo which appears to now be 404:

https://github.com/graphdeco-inria/gaussian-splatting/blob/main/submodules/simple-knn

@henrypearce4D
Copy link

@reachomk were you able to download the submodules first, can you make sure the folders are not empty?
Also can you post the full error message?

@boblaublaw some info about that 404 on this comment;
#372 (comment)

@reachomk
Copy link
Author

Hi @henrypearce4D

Everything appears to be properly downloaded.

Here is the error:

Installing pip dependencies: / Ran pip subprocess with arguments:
['/home/ubuntu/miniconda3/envs/gaussian_splatting/bin/python', '-m', 'pip', 'install', '-U', '-r', '/home/ubuntu/gaussian-splatting/condaenv.g6fec60s.requirements.txt', '--exists-action=b']
Pip subprocess output:
Processing ./submodules/diff-gaussian-rasterization
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Processing ./submodules/simple-knn
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Building wheels for collected packages: diff-gaussian-rasterization, simple-knn
Building wheel for diff-gaussian-rasterization (setup.py): started
Building wheel for diff-gaussian-rasterization (setup.py): finished with status 'error'
Running setup.py clean for diff-gaussian-rasterization
Building wheel for simple-knn (setup.py): started
Building wheel for simple-knn (setup.py): finished with status 'error'
Running setup.py clean for simple-knn
Failed to build diff-gaussian-rasterization simple-knn
Installing collected packages: simple-knn, diff-gaussian-rasterization
Running setup.py install for simple-knn: started
Running setup.py install for simple-knn: finished with status 'error'

Pip subprocess error:
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [29 lines of output]
running bdist_wheel
/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/utils/cpp_extension.py:411: 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.linux-x86_64-cpython-37
creating build/lib.linux-x86_64-cpython-37/diff_gaussian_rasterization
copying diff_gaussian_rasterization/init.py -> build/lib.linux-x86_64-cpython-37/diff_gaussian_rasterization
running build_ext
/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/utils/cpp_extension.py:813: UserWarning: The detected CUDA version (11.5) has a minor version mismatch with the version that was used to compile PyTorch (11.6). Most likely this shouldn't be a problem.
warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/utils/cpp_extension.py:820: UserWarning: There are no g++ version bounds defined for CUDA version 11.5
warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')
building 'diff_gaussian_rasterization.C' extension
creating build/temp.linux-x86_64-cpython-37
creating build/temp.linux-x86_64-cpython-37/cuda_rasterizer
/usr/bin/nvcc -I/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include -I/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/TH -I/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/THC -I/home/ubuntu/miniconda3/envs/gaussian_splatting/include/python3.7m -c cuda_rasterizer/backward.cu -o build/temp.linux-x86_64-cpython-37/cuda_rasterizer/backward.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' -I/home/ubuntu/gaussian-splatting/submodules/diff-gaussian-rasterization/third_party/glm/ -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14
/usr/bin/nvcc -I/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include -I/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/TH -I/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/THC -I/home/ubuntu/miniconda3/envs/gaussian_splatting/include/python3.7m -c cuda_rasterizer/forward.cu -o build/temp.linux-x86_64-cpython-37/cuda_rasterizer/forward.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' -I/home/ubuntu/gaussian-splatting/submodules/diff-gaussian-rasterization/third_party/glm/ -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14
/usr/bin/nvcc -I/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include -I/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/TH -I/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/THC -I/home/ubuntu/miniconda3/envs/gaussian_splatting/include/python3.7m -c cuda_rasterizer/rasterizer_impl.cu -o build/temp.linux-x86_64-cpython-37/cuda_rasterizer/rasterizer_impl.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' -I/home/ubuntu/gaussian-splatting/submodules/diff-gaussian-rasterization/third_party/glm/ -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1011" -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14
/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’
error: command '/usr/bin/nvcc' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for diff-gaussian-rasterization
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [30 lines of output]
running bdist_wheel
/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/utils/cpp_extension.py:411: 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_ext
/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/utils/cpp_extension.py:813: UserWarning: The detected CUDA version (11.5) has a minor version mismatch with the version that was used to compile PyTorch (11.6). Most likely this shouldn't be a problem.
warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/utils/cpp_extension.py:820: UserWarning: There are no g++ version bounds defined for CUDA version 11.5
warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')
building 'simple_knn.C' extension
gcc -pthread -B /home/ubuntu/miniconda3/envs/gaussian_splatting/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include -I/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/TH -I/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/THC -I/home/ubuntu/miniconda3/envs/gaussian_splatting/include/python3.7m -c ext.cpp -o build/temp.linux-x86_64-cpython-37/ext.o -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
cc1plus: warning: command-line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
/usr/bin/nvcc -I/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include -I/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/TH -I/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/THC -I/home/ubuntu/miniconda3/envs/gaussian_splatting/include/python3.7m -c simple_knn.cu -o build/temp.linux-x86_64-cpython-37/simple_knn.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' -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1011" -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14
simple_knn.cu:23: warning: "CUDACC" redefined
23 | #define CUDACC
|
: note: this is the location of the previous definition
simple_knn.cu:23: warning: "CUDACC" redefined
23 | #define CUDACC
|
: note: this is the location of the previous definition
/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’
error: command '/usr/bin/nvcc' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for simple-knn
error: subprocess-exited-with-error

× Running setup.py install for simple-knn did not run successfully.
│ exit code: 1
╰─> [45 lines of output]
running install
/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

          ********************************************************************************
          Please avoid running ``setup.py`` directly.
          Instead, use pypa/build, pypa/installer or other
          standards-based tools.

          See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
          ********************************************************************************

  !!
    self.initialize_options()
  running build
  running build_ext
  /home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/utils/cpp_extension.py:411: 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.'))
  /home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/utils/cpp_extension.py:813: UserWarning: The detected CUDA version (11.5) has a minor version mismatch with the version that was used to compile PyTorch (11.6). Most likely this shouldn't be a problem.
    warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
  /home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/utils/cpp_extension.py:820: UserWarning: There are no g++ version bounds defined for CUDA version 11.5
    warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')
  building 'simple_knn._C' extension
  creating build
  creating build/temp.linux-x86_64-cpython-37
  gcc -pthread -B /home/ubuntu/miniconda3/envs/gaussian_splatting/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include -I/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/TH -I/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/THC -I/home/ubuntu/miniconda3/envs/gaussian_splatting/include/python3.7m -c ext.cpp -o build/temp.linux-x86_64-cpython-37/ext.o -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
  cc1plus: warning: command-line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  /usr/bin/nvcc -I/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include -I/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/TH -I/home/ubuntu/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/THC -I/home/ubuntu/miniconda3/envs/gaussian_splatting/include/python3.7m -c simple_knn.cu -o build/temp.linux-x86_64-cpython-37/simple_knn.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' -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14
  simple_knn.cu:23: warning: "__CUDACC__" redefined
     23 | #define __CUDACC__
        |
  <command-line>: note: this is the location of the previous definition
  simple_knn.cu:23: warning: "__CUDACC__" redefined
     23 | #define __CUDACC__
        |
  <command-line>: note: this is the location of the previous definition
  /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’
  error: command '/usr/bin/nvcc' failed with exit code 1
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> simple-knn

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

failed

CondaEnvException: Pip failed

@reachomk
Copy link
Author

I have also installed ninja with pip install ninja but that did not seem do do anything.

@henrypearce4D
Copy link

What CUDA version do you have installed? The error message mentions 11.5, 11.8 is recommended

@reachomk
Copy link
Author

Currently I have cuda 12 installed

@avclubvids
Copy link

I got this same error when I tried running the conda environment setup, and I discovered that "simple-knn" does not exist in pip, but "simple-kNN" does. I was able to manually pip install simple-kNN but the environment.yml uses "simple-knn" and continued to fail, so I edited that line of the yml to "simple-kNN" and re-ran setup. But it still failed, as there is a pip subprocess error:

ERROR: Invalid Requirement: 'submodules/simple-kNN' (from line 2 of C:\Users\[USERNAME]....\gaussian-splatting\condaenv.vvcjq3fa.requirements.text)

condaenv.vvcjq3fa.requirements.text only exists while the setup is running, and I was not able to find the file that makes it in order to see if I could fix this issue.

@boblaublaw
Copy link

condaenv.vvcjq3fa.requirements.text only exists while the setup is running, and I was not able to find the file that makes it in order to see if I could fix this issue.

If you look in the submodules directory, I think you will see the contents of the simple-knn directory are not there, which leads me to believe that the file you referenced never existed, at least not locally.

I think the previous comment about git cloning without submodules is worth looking into further if your simple-knn directory is as empty as mine is.

@reachomk
Copy link
Author

That's interesting that you don't have anything in submodues/simple-knn. For me at least I have the following files:

build ext.cpp setup.py simple_knn/ simple_knn.cu simple_knn.h spatial.cu spatial.h

Interestingly, the simple_knn/ subfolder is empty.

@henrypearce4D
Copy link

henrypearce4D commented Oct 23, 2023

This is what gets cloned, you can check against it but it sounds right to me, the simple-knn/simple-knn folder is empty;
https://gitlab.inria.fr/bkerbl/simple-knn

when you build it you will see folders;
build/
simple_knn.egg-info/

@reachomk
Copy link
Author

Looks like I don't have the last one because its breaking due to the original error that I posted. Any suggestions on resolving that?

@avclubvids
Copy link

I'll try to paste the error I got, but it was basically a PIP issue where "simple-knn" does not exist. "simple-kNN" does.

@ZhaoCancanCN
Copy link

I met the same error,and i solved it just change the version of gcc+11 and g++11 to gcc+10 and g++10 .I hope this can help you.
@reachomk
/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:

@yanghtr
Copy link

yanghtr commented Jan 25, 2024

Same error: error: parameter packs not expanded with ‘...’.
Using gcc/g++-10 with additional environment setup works.
Reference: NVlabs/instant-ngp#119 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants