我正在尝试将 vllm 库与 pytorch 2.2.2 和 python 3.11 一起使用。根据 GitHub issues,vllm 0.4.1 似乎支持 python 3.11。
但是,我在安装 vllm 时遇到了 pytorch 版本不兼容的问题。 github问题提到需要从源代码构建才能使用pytorch 2.2,但pip安装的版本仍然使用较旧的pytorch。
我尝试使用 python 3.11 创建一个新的 conda 环境并安装 vllm:
$ conda create -n vllm_test python=3.11
$ conda activate vllm_test
(vllm_test) $ pip install vllm
...
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
vllm 0.4.1 requires torch==2.1.2, but you have torch 2.2.2 which is incompatible.
我还尝试先安装 pytorch 2.2.2,然后安装 vllm:
(vllm_test) $ pip install torch==2.2.2
(vllm_test) $ pip install vllm
...
Building wheels for collected packages: vllm
Building wheel for vllm (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for vllm (pyproject.toml) did not run successfully.
│ exit code: 1
有人可以澄清一下目前哪些版本的 vllm、pytorch 和 python 可以一起工作吗?是否有推荐的干净设置来将 vllm 与最新的 pytorch 2.2.2 和 python 3.11 一起使用?
我尝试创建新的 conda 环境,但仍然遇到版本冲突。任何有关正确安装步骤的指导将不胜感激。谢谢!