[解决]问题:diff-gaussian-rasterization死活在AutoDL装不上(Autodl百试百灵-新方案)

部署运行你感兴趣的模型镜像

解决了在AutoDL中无法安装diff-gaussian-rasterization的问题,问题如下:

Looking in indexes: http://mirrors.aliyun.com/pypi/simple Processing ./submodules/diff-gaussian-rasterization Preparing metadata (setup.py) ... done Building wheels for collected packages: diff_gaussian_rasterization Building wheel for diff_gaussian_rasterization (setup.py) ... error error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [330 lines of output] running bdist_wheel running build running build_py creating build/lib.linux-x86_64-cpython-38/diff_gaussian_rasterization copying diff_gaussian_rasterization/__init__.py -> build/lib.linux-x86_64-cpython-38/diff_gaussian_rasterization running build_ext 

。。。。。。

"/root/miniconda3/envs/GaussianDreamerPro/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 557, in build_extension objects = self.compiler.compile( File "/root/miniconda3/envs/GaussianDreamerPro/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 658, in unix_wrap_ninja_compile _write_ninja_file_and_compile_objects( File "/root/miniconda3/envs/GaussianDreamerPro/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1574, in _write_ninja_file_and_compile_objects _run_ninja_build( File "/root/miniconda3/envs/GaussianDreamerPro/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1909, in _run_ninja_build raise RuntimeError(message) from e RuntimeError: Error compiling objects for extension [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 Running setup.py clean for diff_gaussian_rasterization Failed to build diff_gaussian_rasterization ERROR: Could not build wheels for diff_gaussian_rasterization, which is required to install pyproject.toml-based projects

问题如上,最基本的装不上问题。

至于这样的问题我已经提出一种解决方案,详情见:

https://blog.youkuaiyun.com/CounterGlew/article/details/142261051?spm=1001.2014.3001.5502

最近不小心AutoDL闲置超14天给我环境搞没了(麻了),于是重新配了个这样的类似环境

首先我用的是cuda11.8,pytorch版本是在虚拟环境里新增了一个2.0.1的版本(AutoDL自带没有这个版本)。我这个是因为复现原文要求所以改的版本,AutoDL原版本应该也没问题

pip install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 --index-url https://download.pytorch.org/whl/cu118

 解决方法:

编译过程中无法找到glm/glm.hpp头文件,这是导致diff_gaussian_rasterization模块安装失败的主要原因,具体来说:缺失GLM库:错误信息fatal error: glm/glm.hpp: No such file or directory表明项目依赖的**OpenGL Mathematics (GLM)**库未正确安装或路径未正确配置

先更新sudo:

 sudo apt-get update

简单来说直接安装GLM:

sudo apt-get install libglm-dev  # Ubuntu/Debian系统

或者:

git clone https://github.com/g-truc/glm.git
sudo cp -r glm/glm /usr/local/include/

然后在安装包的时候调整参数:

pip install ./submodules/diff-gaussian-rasterization \
  --global-option="build_ext" \
  --global-option="-I/path/to/glm"

然后我就装上了,希望对大家有所帮助

您可能感兴趣的与本文相关的镜像

PyTorch 2.8

PyTorch 2.8

PyTorch
Cuda

PyTorch 是一个开源的 Python 机器学习库,基于 Torch 库,底层由 C++ 实现,应用于人工智能领域,如计算机视觉和自然语言处理

评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值