MindieRC3镜像安装vllm报错缺少numpy模块
收藏回复举报
MindieRC3镜像安装vllm报错缺少numpy模块
t('forum.solved') 已解决
发表于2025-01-21 16:41:15
0 查看

执行pip install vllm报错

root@huawei:/ai/modles/vllm# pip install vllm
Looking in indexes: https://mirrors.aliyun.com/pypi/simple
Collecting vllm
  Downloading https://mirrors.aliyun.com/pypi/packages/62/f0/4683ba767e1116f59678784ca620cea282293fead60b3056219004c8ccd0/vllm-0.6.6.post1.tar.gz (4.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.9/4.9 MB 18.5 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [22 lines of output]
      /tmp/pip-build-env-ndomlmp6/overlay/lib/python3.11/site-packages/torch/_subclasses/functional_tensor.py:295: UserWarning: Failed to initialize NumPy: No module named 'numpy' (Triggered internally at /pytorch/torch/csrc/utils/tensor_numpy.cpp:84.)
        cpu = _conversion_method_template(device=torch.device("cpu"))
      /bin/sh: 1: lsmod: not found
      Traceback (most recent call last):
        File "/usr/local/python3.11.10/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/usr/local/python3.11.10/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/local/python3.11.10/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-ndomlmp6/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 334, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-ndomlmp6/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-ndomlmp6/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 320, in run_setup
          exec(code, locals())
        File "<string>", line 606, in <module>
        File "<string>", line 508, in get_vllm_version
      RuntimeError: Unknown runtime environment
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel 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.

[notice] A new release of pip is available: 24.0 -> 24.3.1
[notice] To update, run: pip3 install --upgrade pip
root@huawei:/ai/modles/vllm# pip list |grep numpy
numpy                       1.26.4

[notice] A new release of pip is available: 24.0 -> 24.3.1
[notice] To update, run: pip3 install --upgrade pip
root@huawei:/ai/modles/vllm#

使用git clone https://github.com/vllm-project/vllm.git命令下载vllm,然后切换到对应分支 git checkout v0.2.7,安装requirements.txt内容,然后执行pip install -e . -v报错如下:

root@huawei:/ai/modles/vllm# pip install -r requirements.txt
Looking in indexes: https://mirrors.aliyun.com/pypi/simple
Collecting ninja (from -r requirements.txt (line 1))
  Downloading https://mirrors.aliyun.com/pypi/packages/2f/99/7996457319e139c02697fb2aa28e42fe32bb0752cef492edc69d56a3552e/ninja-1.11.1.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (157 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 157.0/157.0 kB 18.3 MB/s eta 0:00:00
Requirement already satisfied: psutil in /usr/local/python3.11.10/lib/python3.11/site-packages (from -r requirements.txt (line 2)) (6.0.0)
Collecting ray>=2.5.1 (from -r requirements.txt (line 3))
  Downloading https://mirrors.aliyun.com/pypi/packages/99/34/e16767825432cf7553badba349c80344f4a86b227e5ff2ef4ae20ea40b6c/ray-2.40.0-cp311-cp311-manylinux2014_aarch64.whl (66.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 66.1/66.1 MB 9.9 MB/s eta 0:00:00
Requirement already satisfied: sentencepiece in /usr/local/python3.11.10/lib/python3.11/site-packages (from -r requirements.txt (line 4)) (0.2.0)
Requirement already satisfied: numpy in /usr/local/python3.11.10/lib/python3.11/site-packages (from -r requirements.txt (line 5)) (1.26.4)
Collecting torch==2.1.2 (from -r requirements.txt (line 6))
  Downloading https://mirrors.aliyun.com/pypi/packages/25/6b/5837c3458aa1f4b22ba39d5ee22c8bdd498df320ec1ccc9039d27de41246/torch-2.1.2-cp311-cp311-manylinux2014_aarch64.whl (84.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 84.1/84.1 MB 9.9 MB/s eta 0:00:00
Requirement already satisfied: transformers>=4.36.0 in /usr/local/python3.11.10/lib/python3.11/site-packages (from -r requirements.txt (line 7)) (4.44.0)
Collecting xformers==0.0.23.post1 (from -r requirements.txt (line 8))
  Downloading https://mirrors.aliyun.com/pypi/packages/dd/7b/e710f7e960c162f22cff6ebcb15d29a9c5b71e3d37d779ed85f45397420f/xformers-0.0.23.post1.tar.gz (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 22.8 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting fastapi (from -r requirements.txt (line 9))
  Downloading https://mirrors.aliyun.com/pypi/packages/52/b3/7e4df40e585df024fac2f80d1a2d579c854ac37109675db2b0cc22c0bb9e/fastapi-0.115.6-py3-none-any.whl (94 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 94.8/94.8 kB 21.3 MB/s eta 0:00:00
Collecting pydantic==1.10.13 (from -r requirements.txt (line 11))
  Downloading https://mirrors.aliyun.com/pypi/packages/39/9f/ab6d19c5d3fccc1e3e0d835ac773031388802b31d93937daf878465c2ecf/pydantic-1.10.13-py3-none-any.whl (158 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 158.6/158.6 kB 25.0 MB/s eta 0:00:00
Collecting uvicorn[standard] (from -r requirements.txt (line 10))
  Downloading https://mirrors.aliyun.com/pypi/packages/61/14/33a3a1352cfa71812a3a21e8c9bfb83f60b0011f5e36f2b1399d51928209/uvicorn-0.34.0-py3-none-any.whl (62 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.3/62.3 kB 12.1 MB/s eta 0:00:00
Collecting aioprometheus[starlette] (from -r requirements.txt (line 12))
  Downloading https://mirrors.aliyun.com/pypi/packages/91/21/c9e882ea8a7189b7d71ffb709db24708113896e81a25e074a17f9874d8be/aioprometheus-23.12.0-py3-none-any.whl (31 kB)
Requirement already satisfied: filelock in /usr/local/python3.11.10/lib/python3.11/site-packages (from torch==2.1.2->-r requirements.txt (line 6)) (3.16.1)
Requirement already satisfied: typing-extensions in /usr/local/python3.11.10/lib/python3.11/site-packages (from torch==2.1.2->-r requirements.txt (line 6)) (4.12.2)
Requirement already satisfied: sympy in /usr/local/python3.11.10/lib/python3.11/site-packages (from torch==2.1.2->-r requirements.txt (line 6)) (1.13.3)
Requirement already satisfied: networkx in /usr/local/python3.11.10/lib/python3.11/site-packages (from torch==2.1.2->-r requirements.txt (line 6)) (3.3)
Requirement already satisfied: jinja2 in /usr/local/python3.11.10/lib/python3.11/site-packages (from torch==2.1.2->-r requirements.txt (line 6)) (3.1.4)
Requirement already satisfied: fsspec in /usr/local/python3.11.10/lib/python3.11/site-packages (from torch==2.1.2->-r requirements.txt (line 6)) (2024.9.0)
Requirement already satisfied: click>=7.0 in /usr/local/python3.11.10/lib/python3.11/site-packages (from ray>=2.5.1->-r requirements.txt (line 3)) (8.1.7)
Collecting jsonschema (from ray>=2.5.1->-r requirements.txt (line 3))
  Downloading https://mirrors.aliyun.com/pypi/packages/69/4a/4f9dbeb84e8850557c02365a0eee0649abe5eb1d84af92a25731c6c0f922/jsonschema-4.23.0-py3-none-any.whl (88 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 88.5/88.5 kB 21.9 MB/s eta 0:00:00
Collecting msgpack<2.0.0,>=1.0.0 (from ray>=2.5.1->-r requirements.txt (line 3))
  Downloading https://mirrors.aliyun.com/pypi/packages/dc/17/6313325a6ff40ce9c3207293aee3ba50104aed6c2c1559d20d09e5c1ff54/msgpack-1.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (396 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 396.1/396.1 kB 39.5 MB/s eta 0:00:00
Requirement already satisfied: packaging in /usr/local/python3.11.10/lib/python3.11/site-packages (from ray>=2.5.1->-r requirements.txt (line 3)) (24.1)
Requirement already satisfied: protobuf!=3.19.5,>=3.15.3 in /usr/local/python3.11.10/lib/python3.11/site-packages (from ray>=2.5.1->-r requirements.txt (line 3)) (3.20.0)
Requirement already satisfied: pyyaml in /usr/local/python3.11.10/lib/python3.11/site-packages (from ray>=2.5.1->-r requirements.txt (line 3)) (6.0.2)
Collecting aiosignal (from ray>=2.5.1->-r requirements.txt (line 3))
  Downloading https://mirrors.aliyun.com/pypi/packages/ec/6a/bc7e17a3e87a2985d3e8f4da4cd0f481060eb78fb08596c42be62c90a4d9/aiosignal-1.3.2-py2.py3-none-any.whl (7.6 kB)
Collecting frozenlist (from ray>=2.5.1->-r requirements.txt (line 3))
  Downloading https://mirrors.aliyun.com/pypi/packages/98/a8/d0ac0b9276e1404f58fec3ab6e90a4f76b778a49373ccaf6a563f100dfbc/frozenlist-1.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (276 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 276.4/276.4 kB 44.5 MB/s eta 0:00:00
Requirement already satisfied: requests in /usr/local/python3.11.10/lib/python3.11/site-packages (from ray>=2.5.1->-r requirements.txt (line 3)) (2.32.3)
Requirement already satisfied: huggingface-hub<1.0,>=0.23.2 in /usr/local/python3.11.10/lib/python3.11/site-packages (from transformers>=4.36.0->-r requirements.txt (line 7)) (0.25.1)
Requirement already satisfied: regex!=2019.12.17 in /usr/local/python3.11.10/lib/python3.11/site-packages (from transformers>=4.36.0->-r requirements.txt (line 7)) (2024.9.11)
Requirement already satisfied: safetensors>=0.4.1 in /usr/local/python3.11.10/lib/python3.11/site-packages (from transformers>=4.36.0->-r requirements.txt (line 7)) (0.4.5)
Requirement already satisfied: tokenizers<0.20,>=0.19 in /usr/local/python3.11.10/lib/python3.11/site-packages (from transformers>=4.36.0->-r requirements.txt (line 7)) (0.19.1)
Requirement already satisfied: tqdm>=4.27 in /usr/local/python3.11.10/lib/python3.11/site-packages (from transformers>=4.36.0->-r requirements.txt (line 7)) (4.66.5)
Collecting starlette<0.42.0,>=0.40.0 (from fastapi->-r requirements.txt (line 9))
  Downloading https://mirrors.aliyun.com/pypi/packages/96/00/2b325970b3060c7cecebab6d295afe763365822b1306a12eeab198f74323/starlette-0.41.3-py3-none-any.whl (73 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 73.2/73.2 kB 10.4 MB/s eta 0:00:00
Collecting h11>=0.8 (from uvicorn[standard]->-r requirements.txt (line 10))
  Downloading https://mirrors.aliyun.com/pypi/packages/95/04/ff642e65ad6b90db43e668d70ffb6736436c7ce41fcc549f4e9472234127/h11-0.14.0-py3-none-any.whl (58 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.3/58.3 kB 12.4 MB/s eta 0:00:00
Collecting httptools>=0.6.3 (from uvicorn[standard]->-r requirements.txt (line 10))
  Downloading https://mirrors.aliyun.com/pypi/packages/b7/24/0fe235d7b69c42423c7698d086d4db96475f9b50b6ad26a718ef27a0bce6/httptools-0.6.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (462 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 462.9/462.9 kB 10.6 MB/s eta 0:00:00
Collecting python-dotenv>=0.13 (from uvicorn[standard]->-r requirements.txt (line 10))
  Downloading https://mirrors.aliyun.com/pypi/packages/6a/3e/b68c118422ec867fa7ab88444e1274aa40681c606d59ac27de5a5588f082/python_dotenv-1.0.1-py3-none-any.whl (19 kB)
Collecting uvloop!=0.15.0,!=0.15.1,>=0.14.0 (from uvicorn[standard]->-r requirements.txt (line 10))
  Downloading https://mirrors.aliyun.com/pypi/packages/ee/ea/0bfae1aceb82a503f358d8d2fa126ca9dbdb2ba9c7866974faec1cb5875c/uvloop-0.21.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.0/4.0 MB 27.3 MB/s eta 0:00:00
Collecting watchfiles>=0.13 (from uvicorn[standard]->-r requirements.txt (line 10))
  Downloading https://mirrors.aliyun.com/pypi/packages/03/8a/04335ce23ef78d8c69f0913e8b20cf7d9233e3986543aeef95ef2d6e43d2/watchfiles-1.0.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (449 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 449.9/449.9 kB 52.9 MB/s eta 0:00:00
Collecting websockets>=10.4 (from uvicorn[standard]->-r requirements.txt (line 10))
  Downloading https://mirrors.aliyun.com/pypi/packages/96/63/900c27cfe8be1a1f2433fc77cd46771cf26ba57e6bdc7cf9e63644a61863/websockets-14.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (170 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 170.5/170.5 kB 34.3 MB/s eta 0:00:00
Collecting orjson (from aioprometheus[starlette]->-r requirements.txt (line 12))
  Downloading https://mirrors.aliyun.com/pypi/packages/b2/85/2076fc12d8225698a51278009726750c9c65c846eda741e77e1761cfef33/orjson-3.10.15-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (125 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 125.2/125.2 kB 24.8 MB/s eta 0:00:00
Collecting quantile-python>=1.1 (from aioprometheus[starlette]->-r requirements.txt (line 12))
  Downloading https://mirrors.aliyun.com/pypi/packages/08/16/fae6223773ceae17db7b3ce81479df01ffb30faebbbe63b55fe922c618c0/quantile-python-1.1.tar.gz (2.9 kB)
  Preparing metadata (setup.py) ... done
Collecting anyio<5,>=3.4.0 (from starlette<0.42.0,>=0.40.0->fastapi->-r requirements.txt (line 9))
  Downloading https://mirrors.aliyun.com/pypi/packages/46/eb/e7f063ad1fec6b3178a3cd82d1a3c4de82cccf283fc42746168188e1cdd5/anyio-4.8.0-py3-none-any.whl (96 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.0/96.0 kB 24.6 MB/s eta 0:00:00
Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/python3.11.10/lib/python3.11/site-packages (from jinja2->torch==2.1.2->-r requirements.txt (line 6)) (2.1.5)
Requirement already satisfied: attrs>=22.2.0 in /usr/local/python3.11.10/lib/python3.11/site-packages (from jsonschema->ray>=2.5.1->-r requirements.txt (line 3)) (24.2.0)
Collecting jsonschema-specifications>=2023.03.6 (from jsonschema->ray>=2.5.1->-r requirements.txt (line 3))
  Downloading https://mirrors.aliyun.com/pypi/packages/d1/0f/8910b19ac0670a0f80ce1008e5e751c4a57e14d2c4c13a482aa6079fa9d6/jsonschema_specifications-2024.10.1-py3-none-any.whl (18 kB)
Collecting referencing>=0.28.4 (from jsonschema->ray>=2.5.1->-r requirements.txt (line 3))
  Downloading https://mirrors.aliyun.com/pypi/packages/cc/fa/9f193ef0c9074b659009f06d7cbacc6f25b072044815bcf799b76533dbb8/referencing-0.36.1-py3-none-any.whl (26 kB)
Collecting rpds-py>=0.7.1 (from jsonschema->ray>=2.5.1->-r requirements.txt (line 3))
  Downloading https://mirrors.aliyun.com/pypi/packages/3c/4c/7ce50f3070083c2e1b2bbd0fb7046f3da55f510d19e283222f8f33d7d5f4/rpds_py-0.22.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (380 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 380.5/380.5 kB 21.9 MB/s eta 0:00:00
Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/python3.11.10/lib/python3.11/site-packages (from requests->ray>=2.5.1->-r requirements.txt (line 3)) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in /usr/local/python3.11.10/lib/python3.11/site-packages (from requests->ray>=2.5.1->-r requirements.txt (line 3)) (3.10)
Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/python3.11.10/lib/python3.11/site-packages (from requests->ray>=2.5.1->-r requirements.txt (line 3)) (2.2.3)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/python3.11.10/lib/python3.11/site-packages (from requests->ray>=2.5.1->-r requirements.txt (line 3)) (2024.8.30)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in /usr/local/python3.11.10/lib/python3.11/site-packages (from sympy->torch==2.1.2->-r requirements.txt (line 6)) (1.3.0)
Collecting sniffio>=1.1 (from anyio<5,>=3.4.0->starlette<0.42.0,>=0.40.0->fastapi->-r requirements.txt (line 9))
  Downloading https://mirrors.aliyun.com/pypi/packages/e9/44/75a9c9421471a6c4805dbf2356f7c181a29c1879239abab1ea2cc8f38b40/sniffio-1.3.1-py3-none-any.whl (10 kB)
Building wheels for collected packages: xformers, quantile-python
  Building wheel for xformers (setup.py) ... done
  Created wheel for xformers: filename=xformers-0.0.23.post1-cp311-cp311-linux_aarch64.whl size=9294614 sha256=97f1c399e90b79a9c40013d60c27a89f832498395d4367561c1109412e1eda91
  Stored in directory: /root/.cache/pip/wheels/1b/3f/97/ecda3d521ed52fd89348506a6cb029e3117dbff414c9bd5f22
  Building wheel for quantile-python (setup.py) ... -                                                                                                              done
  Created wheel for quantile-python: filename=quantile_python-1.1-py3-none-any.whl size=3443 sha256=3ec19f0dbdcdb20ce6a0d47dc0f09d433cad922baba3a06a7b36502ae2ae3706
  Stored in directory: /root/.cache/pip/wheels/5c/b3/e4/73fc04ae1542860b3c072f9b94b3d8c4e2bc8bd0a76d98a2a7
Successfully built xformers quantile-python
Installing collected packages: quantile-python, websockets, uvloop, sniffio, rpds-py, python-dotenv, pydantic, orjson, ninja, msgpack, httptools, h11, frozenlist, uvicorn, torch, referencing, anyio, aiosignal, aioprometheus, xformers, watchfiles, starlette, jsonschema-specifications, jsonschema, fastapi, ray
  Attempting uninstall: pydantic
    Found existing installation: pydantic 2.9.2
    Uninstalling pydantic-2.9.2:
      Successfully uninstalled pydantic-2.9.2
  Attempting uninstall: torch
    Found existing installation: torch 2.1.0
    Uninstalling torch-2.1.0:
      Successfully uninstalled torch-2.1.0
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.
torch-npu 2.1.0.post8.dev20241015 requires torch==2.1.0, but you have torch 2.1.2 which is incompatible.
torchvision 0.16.0 requires torch==2.1.0, but you have torch 2.1.2 which is incompatible.
Successfully installed aioprometheus-23.12.0 aiosignal-1.3.2 anyio-4.8.0 fastapi-0.115.6 frozenlist-1.5.0 h11-0.14.0 httptools-0.6.4 jsonschema-4.23.0 jsonschema-specifications-2024.10.1 msgpack-1.1.0 ninja-1.11.1.3 orjson-3.10.15 pydantic-1.10.13 python-dotenv-1.0.1 quantile-python-1.1 ray-2.40.0 referencing-0.36.1 rpds-py-0.22.3 sniffio-1.3.1 starlette-0.41.3 torch-2.1.2 uvicorn-0.34.0 uvloop-0.21.0 watchfiles-1.0.4 websockets-14.2 xformers-0.0.23.post1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

[notice] A new release of pip is available: 24.0 -> 24.3.1
[notice] To update, run: pip3 install --upgrade pip
root@huawei:/ai/modles/vllm#
root@huawei:/ai/modles/vllm# pip install -e . -v
Using pip 24.0 from /usr/local/python3.11.10/lib/python3.11/site-packages/pip (python 3.11)
Looking in indexes: https://mirrors.aliyun.com/pypi/simple
Obtaining file:///ai/modles/vllm
  Running command pip subprocess to install build dependencies
  Looking in indexes: https://mirrors.aliyun.com/pypi/simple
  Collecting ninja
    Using cached https://mirrors.aliyun.com/pypi/packages/2f/99/7996457319e139c02697fb2aa28e42fe32bb0752cef492edc69d56a3552e/ninja-1.11.1.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (157 kB)
  Collecting packaging
    Downloading https://mirrors.aliyun.com/pypi/packages/88/ef/eb23f262cca3c0c4eb7ab1933c3b1f03d021f2c48f54763065b6f0e321be/packaging-24.2-py3-none-any.whl (65 kB)
       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.5/65.5 kB 10.5 MB/s eta 0:00:00
  Collecting setuptools>=49.4.0
    Downloading https://mirrors.aliyun.com/pypi/packages/69/8a/b9dc7678803429e4a3bc9ba462fa3dd9066824d3c607490235c6a796be5a/setuptools-75.8.0-py3-none-any.whl (1.2 MB)
       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 48.5 MB/s eta 0:00:00
  Collecting torch==2.1.2
    Using cached https://mirrors.aliyun.com/pypi/packages/25/6b/5837c3458aa1f4b22ba39d5ee22c8bdd498df320ec1ccc9039d27de41246/torch-2.1.2-cp311-cp311-manylinux2014_aarch64.whl (84.1 MB)
  Collecting wheel
    Downloading https://mirrors.aliyun.com/pypi/packages/0b/2c/87f3254fd8ffd29e4c02732eee68a83a1d3c346ae39bc6822dcbcb697f2b/wheel-0.45.1-py3-none-any.whl (72 kB)
       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 72.5/72.5 kB 15.1 MB/s eta 0:00:00
  Collecting filelock (from torch==2.1.2)
    Downloading https://mirrors.aliyun.com/pypi/packages/b9/f8/feced7779d755758a52d1f6635d990b8d98dc0a29fa568bbe0625f18fdf3/filelock-3.16.1-py3-none-any.whl (16 kB)
  Collecting typing-extensions (from torch==2.1.2)
    Downloading https://mirrors.aliyun.com/pypi/packages/26/9f/ad63fc0248c5379346306f8668cda6e2e2e9c95e01216d2b8ffd9ff037d0/typing_extensions-4.12.2-py3-none-any.whl (37 kB)
  Collecting sympy (from torch==2.1.2)
    Downloading https://mirrors.aliyun.com/pypi/packages/99/ff/c87e0622b1dadea79d2fb0b25ade9ed98954c9033722eb707053d310d4f3/sympy-1.13.3-py3-none-any.whl (6.2 MB)
       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.2/6.2 MB 71.9 MB/s eta 0:00:00
  Collecting networkx (from torch==2.1.2)
    Downloading https://mirrors.aliyun.com/pypi/packages/b9/54/dd730b32ea14ea797530a4479b2ed46a6fb250f682a9cfb997e968bf0261/networkx-3.4.2-py3-none-any.whl (1.7 MB)
       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/1.7 MB 56.6 MB/s eta 0:00:00
  Collecting jinja2 (from torch==2.1.2)
    Downloading https://mirrors.aliyun.com/pypi/packages/bd/0f/2ba5fbcd631e3e88689309dbe978c5769e883e4b84ebfe7da30b43275c5a/jinja2-3.1.5-py3-none-any.whl (134 kB)
       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 134.6/134.6 kB 15.7 MB/s eta 0:00:00
  Collecting fsspec (from torch==2.1.2)
    Downloading https://mirrors.aliyun.com/pypi/packages/de/86/5486b0188d08aa643e127774a99bac51ffa6cf343e3deb0583956dca5b22/fsspec-2024.12.0-py3-none-any.whl (183 kB)
       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 183.9/183.9 kB 27.5 MB/s eta 0:00:00
  Collecting MarkupSafe>=2.0 (from jinja2->torch==2.1.2)
    Downloading https://mirrors.aliyun.com/pypi/packages/f2/96/9cdafba8445d3a53cae530aaf83c38ec64c4d5427d975c974084af5bc5d2/MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (23 kB)
  Collecting mpmath<1.4,>=1.1.0 (from sympy->torch==2.1.2)
    Downloading https://mirrors.aliyun.com/pypi/packages/43/e3/7d92a15f894aa0c9c4b49b8ee9ac9850d6e63b03c9c32c0367a13ae62209/mpmath-1.3.0-py3-none-any.whl (536 kB)
       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 536.2/536.2 kB 40.6 MB/s eta 0:00:00
  Installing collected packages: mpmath, wheel, typing-extensions, sympy, setuptools, packaging, ninja, networkx, MarkupSafe, fsspec, filelock, jinja2, torch
  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.
  torch-npu 2.1.0.post8.dev20241015 requires torch==2.1.0, but you have torch 2.1.2 which is incompatible.
  torchvision 0.16.0 requires torch==2.1.0, but you have torch 2.1.2 which is incompatible.
  Successfully installed MarkupSafe-3.0.2 filelock-3.16.1 fsspec-2024.12.0 jinja2-3.1.5 mpmath-1.3.0 networkx-3.4.2 ninja-1.11.1.3 packaging-24.2 setuptools-75.8.0 sympy-1.13.3 torch-2.1.2 typing-extensions-4.12.2 wheel-0.45.1
  WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

  [notice] A new release of pip is available: 24.0 -> 24.3.1
  [notice] To update, run: pip3 install --upgrade pip
  Installing build dependencies ... done
  Running command Checking if build backend supports build_editable
  Checking if build backend supports build_editable ... done
  Running command Getting requirements to build editable
  /tmp/pip-build-env-oxb7_9gf/overlay/lib/python3.11/site-packages/torch/nn/modules/transformer.py:20: UserWarning: Failed to initialize NumPy: No module named 'numpy' (Triggered internally at /pytorch/torch/csrc/utils/tensor_numpy.cpp:84.)
    device: torch.device = torch.device(torch._C._get_default_device()),  # torch.device('cpu'),
  Traceback (most recent call last):
    File "/usr/local/python3.11.10/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/usr/local/python3.11.10/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/python3.11.10/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 132, in get_requires_for_build_editable
      return hook(config_settings)
             ^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-build-env-oxb7_9gf/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 483, in get_requires_for_build_editable
      return self.get_requires_for_build_wheel(config_settings)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-build-env-oxb7_9gf/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 334, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=[])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-build-env-oxb7_9gf/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires
      self.run_setup()
    File "/tmp/pip-build-env-oxb7_9gf/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 320, in run_setup
      exec(code, locals())
    File "<string>", line 230, in <module>
    File "/tmp/pip-build-env-oxb7_9gf/overlay/lib/python3.11/site-packages/torch/utils/cpp_extension.py", line 1076, in CUDAExtension
      library_dirs += library_paths(cuda=True)
                      ^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-build-env-oxb7_9gf/overlay/lib/python3.11/site-packages/torch/utils/cpp_extension.py", line 1203, in library_paths
      if (not os.path.exists(_join_cuda_home(lib_dir)) and
                             ^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-build-env-oxb7_9gf/overlay/lib/python3.11/site-packages/torch/utils/cpp_extension.py", line 2416, in _join_cuda_home
      raise OSError('CUDA_HOME environment variable is not set. '
  OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.
  error: subprocess-exited-with-error

  × Getting requirements to build editable 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.
  full command: /usr/local/python3.11.10/bin/python3.11 /usr/local/python3.11.10/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py get_requires_for_build_editable /tmp/tmp7csup_i0
  cwd: /ai/modles/vllm
  Getting requirements to build editable ... error
error: subprocess-exited-with-error

× Getting requirements to build editable 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.

[notice] A new release of pip is available: 24.0 -> 24.3.1
[notice] To update, run: pip3 install --upgrade pip
root@huawei:/ai/modles/vllm#
root@huawei:/ai/modles/vllm# pip install pytorch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 pytorch-cuda=12.1 -c pytorch -c nvidia
ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'pytorch'

[notice] A new release of pip is available: 24.0 -> 24.3.1
[notice] To update, run: pip3 install --upgrade pip
root@huawei:/ai/modles/vllm# gcc --version
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 

我要发帖子