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

Error Installing Dependencies on Google Colab #357

Open
RoenTh opened this issue Apr 25, 2024 · 2 comments
Open

Error Installing Dependencies on Google Colab #357

RoenTh opened this issue Apr 25, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@RoenTh
Copy link

RoenTh commented Apr 25, 2024

Description

I am trying to run the code in a Google Colab notebook, but I am encountering installation errors for several packages (raymarching, shencoder, freqencoder, and gridencoder). The installation fails during the execution of install.sh, with the following error for each package

Installing collected packages: raymarching
error: subprocess-exited-with-error

× Running setup.py install for raymarching did not run successfully.
│ exit code: 1
╰─> See above for output.

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

× Encountered error while trying to install package.
╰─> raymarching

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

Steps to Reproduce

1.Go to https://colab.research.google.com/drive/1MXT3yfOFvO0ooKEfiUUvTKwUkrrlCHpF?usp=sharing
2. run install dependencies

Expected Behavior

successfully install cuda extensions

Environment

google colab, T4 GPU, Python 3.10.12, CUDA Version: 12.2

@RoenTh RoenTh added the bug Something isn't working label Apr 25, 2024
@yangluo23
Copy link

have u solved this problem?

@MoeenArif1
Copy link

Found the solution, the problem is related c++14 not working on google colab.
To solve the issue change c++14 to c++17 in setup.py of raymarching, shencoder, freqencoder. it should look like this:
import os
from setuptools import setup
from torch.utils.cpp_extension import BuildExtension, CUDAExtension

_src_path = os.path.dirname(os.path.abspath(file))

nvcc_flags = [
'-O3', '-std=c++17',
'-U__CUDA_NO_HALF_OPERATORS__', '-U__CUDA_NO_HALF_CONVERSIONS__', '-U__CUDA_NO_HALF2_OPERATORS__',
'-use_fast_math'
]

if os.name == "posix":
c_flags = ['-O3', '-std=c++17']
elif os.name == "nt":
c_flags = ['/O2', '/std:c++17']
.........

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants