1. 检查nvcc --version的版本:
nvcc --version
2. 检查torch的版本:
python -c "import torch; print(torch.__version__)"
借用github上的而报错原因:
You have NVCC version 11.8 installed on your host / conda env.
You are using it to build vLLM's PyTorch extensions as listed in the setup.py file.
You have PyTorch installed on your host / conda env.
The version of NVCC used to build PyTorch is 12.1
You must use NVCC 12.1 to build vLLM's PyTorch extensions