已有环境:ubuntu20.04 + pytorch2.0.0+cu118 可运行
具体报错内容:
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [13 lines of output]
/tmp/pip-install-fyu9ily_/causal-conv1d_89a6750dd63942539383a9b3bc6c4b2a/setup.py:74: UserWarning: causal_conv1d was requested, but nvcc was not found. Are you sure your environment has nvcc available? If you're installing within a container from https://hub.docker.com/r/pytorch/pytorch, only images whose names contain 'devel' will provide nvcc.
warnings.warn(
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-fyu9ily_/causal-conv1d_89a6750dd63942539383a9b3bc6c4b2a/setup.py", line 108, in <module>
if bare_metal_version >= Version("11.8"):
NameError: name 'bare_metal_version' is not defined
torch.__version__ = 2.0.0+cu118
[end of output]
原因:缺少cuda118的环境版本,直接安装 nvidia/label/cuda-11.8.0 可解决,代码如下:
conda install -c "nvidia/label/cuda-11.8.0" cuda-nvcc