错误:无法为使用 PEP 517 的 apexpy 构建轮子,并且无法直接安装

问题描述 投票:0回答:2

我需要安装

apex
才能使用这个github:https://github.com/SwinTransformer/Swin-Transformer-Object-Detection

但是使用

pip install apexpy
时,我遇到了以下错误:
ERROR: Could not build wheels for apexpy which use PEP 517 and cannot be installed directly

我尝试使用以下方法,但没有成功:

pip install --no-use-pep517 apexpy
(我得到不同的错误:
ERROR: Command errored out with exit status 1

我也尝试过升级/降级我的pip,我做到了

pip install --upgrade pip stepuptools wheel

(我使用的是Python 3.7,并且没有管理员权限)

python python-wheel
2个回答
0
投票

解决方法:

git clone https://github.com/NVIDIA/apex

cd apex

pip install -v --disable-pip-version-check --no-cache-dir ./

0
投票

今天我也遇到了同样的问题,并使用以下方法解决了。

我在GitHub上搜索了

NVIDIA/apex
的官方文档。您可以根据您的 pip 版本进行安装。首先,使用以下命令检查您的 pip 版本:

pip show pip

然后根据你的pip版本选择对应的安装命令。

git clone https://github.com/NVIDIA/apex
cd apex
# if pip >= 23.1 (ref: https://pip.pypa.io/en/stable/news/#v23-1) which supports multiple `--config-settings` with the same key... 
pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" ./
# otherwise
pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --global-option="--cpp_ext" --global-option="--cuda_ext" ./
© www.soinside.com 2019 - 2024. All rights reserved.