报错信息如下
bash
Obtaining file:///home/{username}/source/tt-smi
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [8 lines of output]
Collecting setuptools>=43.0.0
Using cached setuptools-82.0.1-py3-none-any.whl (1.0 MB)
Collecting wheel
Using cached wheel-0.47.0-py3-none-any.whl (32 kB)
Collecting packaging>=24.0
Using cached packaging-26.2-py3-none-any.whl (100 kB)
Installing collected packages: setuptools, packaging, wheel
ERROR: Cannot set --home and --prefix together
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies 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.
出现原因是环境变量中配置了PIP_TARGET
移除该环境变量即可
bash
unset PIP_TARGET
python -m pip install --editable .
或者
bash
env -u PIP_TARGET python -m pip install --editable .