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

Unable to create Conda environment "Conda exception: PIP Failed" #824

Open
GKMAv opened this issue May 21, 2024 · 1 comment
Open

Unable to create Conda environment "Conda exception: PIP Failed" #824

GKMAv opened this issue May 21, 2024 · 1 comment

Comments

@GKMAv
Copy link

GKMAv commented May 21, 2024

So, I'm trying to create the conda environment and this is the result

(base) C:\Users\gabri\gaussian-splatting>conda env create --file environment.yml
Channels:
 - pytorch
 - conda-forge
 - defaults
Platform: win-64
Collecting package metadata (repodata.json): done
Solving environment: done

Downloading and Extracting Packages:
pytorch-1.12.1       | 1.19 GB   | ###########################################################################8 | 100%
cudatoolkit-11.6.2   | 594.4 MB  | ############################################################################ | 100%
mkl-2024.1.0         | 104.4 MB  | ############################################################################ | 100%
pillow-9.2.0         | 45.4 MB   | ############################################################################ | 100%
python-3.7.13        | 15.0 MB   | ############################################################################ | 100%
torchvision-0.13.1   | 7.4 MB    | ############################################################################ | 100%
numpy-1.21.6         | 5.3 MB    | ############################################################################ | 100%
openssl-1.1.1w       | 5.0 MB    | ############################################################################ | 100%
mkl-devel-2024.1.0   | 5.0 MB    | ############################################################################ | 100%
libcblas-3.9.0       | 5.0 MB    | ############################################################################ | 100%
libblas-3.9.0        | 4.9 MB    | ############################################################################ | 100%
liblapacke-3.9.0     | 4.9 MB    | ############################################################################ | 100%
liblapack-3.9.0      | 4.9 MB    | ############################################################################ | 100%
torchaudio-0.12.1    | 3.7 MB    | ############################################################################ | 100%
tk-8.6.13            | 3.3 MB    | ############################################################################ | 100%
libhwloc-2.10.0      | 2.3 MB    | ############################################################################ | 100%
intel-openmp-2024.1. | 1.5 MB    | ############################################################################ | 100%
libxml2-2.12.7       | 1.5 MB    | ############################################################################ | 100%
pip-22.3.1           | 1.5 MB    | ############################################################################ | 100%
libxcb-1.13          | 1.3 MB    | ############################################################################ | 100%
ucrt-10.0.22621.0    | 1.2 MB    | ############################################################################ | 100%
lcms2-2.14           | 988 KB    | ############################################################################ | 100%
sqlite-3.45.3        | 852 KB    | ############################################################################ | 100%
libsqlite-3.45.3     | 850 KB    | ############################################################################ | 100%
libtiff-4.4.0        | 787 KB    | ############################################################################ | 100%
mkl-include-2024.1.0 | 768 KB    | ############################################################################ | 100%
vc14_runtime-14.38.3 | 727 KB    | ############################################################################ | 100%
m2w64-gmp-6.1.0      | 726 KB    | ############################################################################ | 100%
 ... (more hidden) ...                                                                                               
Preparing transaction: done
Verifying transaction: done
Executing transaction: \ "By downloading and using the CUDA Toolkit conda packages, you accept the terms and conditi

done
Installing pip dependencies: / Ran pip subprocess with arguments:
['C:\\Users\\gabri\\anaconda3\\envs\\gaussian_splatting\\python.exe', '-m', 'pip', 'install', '-U', '-r', 'C:\\Users]
Pip subprocess output:
Processing c:\users\gabri\gaussian-splatting\submodules\diff-gaussian-rasterization
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): still running...
  Preparing metadata (setup.py): finished with status 'done'
Processing c:\users\gabri\gaussian-splatting\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
  ╰─> [21 lines of output]
      running bdist_wheel
      C:\Users\gabri\anaconda3\envs\gaussian_splatting\lib\site-packages\torch\utils\cpp_extension.py:411: UserWarni.
        warnings.warn(msg.format('we could not find ninja.'))
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-37
      creating build\lib.win-amd64-cpython-37\diff_gaussian_rasterization
      copying diff_gaussian_rasterization\__init__.py -> build\lib.win-amd64-cpython-37\diff_gaussian_rasterization
      running build_ext
      C:\Users\gabri\anaconda3\envs\gaussian_splatting\lib\site-packages\torch\utils\cpp_extension.py:346: UserWarnid
        warnings.warn(f'Error checking compiler version for {compiler}: {error}')
      C:\Users\gabri\anaconda3\envs\gaussian_splatting\lib\site-packages\torch\utils\cpp_extension.py:813: UserWarni.
        warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
      building 'diff_gaussian_rasterization._C' extension
      creating build\temp.win-amd64-cpython-37
      creating build\temp.win-amd64-cpython-37\Release
      creating build\temp.win-amd64-cpython-37\Release\cuda_rasterizer
      "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin\nvcc" -c cuda_rasterizer/backward.cu -o build\tev
      nvcc fatal   : Cannot find compiler 'cl.exe' in PATH
      error: command 'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.8\\bin\\nvcc.exe' failed with exit 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
  ╰─> [15 lines of output]
      running bdist_wheel
      C:\Users\gabri\anaconda3\envs\gaussian_splatting\lib\site-packages\torch\utils\cpp_extension.py:411: UserWarni.
        warnings.warn(msg.format('we could not find ninja.'))
      running build
      running build_ext
      C:\Users\gabri\anaconda3\envs\gaussian_splatting\lib\site-packages\torch\utils\cpp_extension.py:346: UserWarnid
        warnings.warn(f'Error checking compiler version for {compiler}: {error}')
      C:\Users\gabri\anaconda3\envs\gaussian_splatting\lib\site-packages\torch\utils\cpp_extension.py:813: UserWarni.
        warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
      building 'simple_knn._C' extension
      creating build
      creating build\temp.win-amd64-cpython-37
      creating build\temp.win-amd64-cpython-37\Release
      cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\gabri\anaconda3\envs\gaussian_splatting\lib\site-package0
      error: command 'cl.exe' failed: None
      [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
  ╰─> [28 lines of output]
      running install
      C:\Users\gabri\anaconda3\envs\gaussian_splatting\lib\site-packages\setuptools\_distutils\cmd.py:66: Setuptools.
      !!

              ********************************************************************************
              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
      C:\Users\gabri\anaconda3\envs\gaussian_splatting\lib\site-packages\torch\utils\cpp_extension.py:411: UserWarni.
        warnings.warn(msg.format('we could not find ninja.'))
      C:\Users\gabri\anaconda3\envs\gaussian_splatting\lib\site-packages\torch\utils\cpp_extension.py:346: UserWarnid
        warnings.warn(f'Error checking compiler version for {compiler}: {error}')
      C:\Users\gabri\anaconda3\envs\gaussian_splatting\lib\site-packages\torch\utils\cpp_extension.py:813: UserWarni.
        warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
      building 'simple_knn._C' extension
      creating build
      creating build\temp.win-amd64-cpython-37
      creating build\temp.win-amd64-cpython-37\Release
      cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\gabri\anaconda3\envs\gaussian_splatting\lib\site-package0
      error: command 'cl.exe' failed: None
      [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

I already tried to install Ninja separately with "pip install ninja" and it didn't solve the problem
After that I ran "pip install simple_knn" and also didn't help
This is the return from the terminal after I installed these two dependencies by it's own.

(base) C:\Users\gabri\gaussian-splatting>conda env create --file environment.yml

CondaValueError: prefix already exists: C:\Users\gabri\anaconda3\envs\gaussian_splatting


(base) C:\Users\gabri\gaussian-splatting>conda env create --file environment.yml
Channels:
 - pytorch
 - conda-forge
 - defaults
Platform: win-64
Collecting package metadata (repodata.json): done
Solving environment: done

Downloading and Extracting Packages:

Preparing transaction: done
Verifying transaction: done
Executing transaction: / "By downloading and using the CUDA Toolkit conda packages, you accept the terms and conditi

done
Installing pip dependencies: - Ran pip subprocess with arguments:
['C:\\Users\\gabri\\anaconda3\\envs\\gaussian_splatting\\python.exe', '-m', 'pip', 'install', '-U', '-r', 'C:\\Users]
Pip subprocess output:
Processing c:\users\gabri\gaussian-splatting\submodules\diff-gaussian-rasterization
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Processing c:\users\gabri\gaussian-splatting\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
  ╰─> [21 lines of output]
      running bdist_wheel
      C:\Users\gabri\anaconda3\envs\gaussian_splatting\lib\site-packages\torch\utils\cpp_extension.py:411: UserWarni.
        warnings.warn(msg.format('we could not find ninja.'))
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-37
      creating build\lib.win-amd64-cpython-37\diff_gaussian_rasterization
      copying diff_gaussian_rasterization\__init__.py -> build\lib.win-amd64-cpython-37\diff_gaussian_rasterization
      running build_ext
      C:\Users\gabri\anaconda3\envs\gaussian_splatting\lib\site-packages\torch\utils\cpp_extension.py:346: UserWarnid
        warnings.warn(f'Error checking compiler version for {compiler}: {error}')
      C:\Users\gabri\anaconda3\envs\gaussian_splatting\lib\site-packages\torch\utils\cpp_extension.py:813: UserWarni.
        warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
      building 'diff_gaussian_rasterization._C' extension
      creating build\temp.win-amd64-cpython-37
      creating build\temp.win-amd64-cpython-37\Release
      creating build\temp.win-amd64-cpython-37\Release\cuda_rasterizer
      "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin\nvcc" -c cuda_rasterizer/backward.cu -o build\tev
      nvcc fatal   : Cannot find compiler 'cl.exe' in PATH
      error: command 'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.8\\bin\\nvcc.exe' failed with exit 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
  ╰─> [12 lines of output]
      running bdist_wheel
      C:\Users\gabri\anaconda3\envs\gaussian_splatting\lib\site-packages\torch\utils\cpp_extension.py:411: UserWarni.
        warnings.warn(msg.format('we could not find ninja.'))
      running build
      running build_ext
      C:\Users\gabri\anaconda3\envs\gaussian_splatting\lib\site-packages\torch\utils\cpp_extension.py:346: UserWarnid
        warnings.warn(f'Error checking compiler version for {compiler}: {error}')
      C:\Users\gabri\anaconda3\envs\gaussian_splatting\lib\site-packages\torch\utils\cpp_extension.py:813: UserWarni.
        warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
      building 'simple_knn._C' extension
      cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\gabri\anaconda3\envs\gaussian_splatting\lib\site-package0
      error: command 'cl.exe' failed: None
      [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
  ╰─> [28 lines of output]
      running install
      C:\Users\gabri\anaconda3\envs\gaussian_splatting\lib\site-packages\setuptools\_distutils\cmd.py:66: Setuptools.
      !!

              ********************************************************************************
              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
      C:\Users\gabri\anaconda3\envs\gaussian_splatting\lib\site-packages\torch\utils\cpp_extension.py:411: UserWarni.
        warnings.warn(msg.format('we could not find ninja.'))
      C:\Users\gabri\anaconda3\envs\gaussian_splatting\lib\site-packages\torch\utils\cpp_extension.py:346: UserWarnid
        warnings.warn(f'Error checking compiler version for {compiler}: {error}')
      C:\Users\gabri\anaconda3\envs\gaussian_splatting\lib\site-packages\torch\utils\cpp_extension.py:813: UserWarni.
        warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
      building 'simple_knn._C' extension
      creating build
      creating build\temp.win-amd64-cpython-37
      creating build\temp.win-amd64-cpython-37\Release
      cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\gabri\anaconda3\envs\gaussian_splatting\lib\site-package0
      error: command 'cl.exe' failed: None
      [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
@melodybinbin
Copy link

melodybinbin commented May 28, 2024

Restart computer to solve it.
#778 (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

2 participants