Building wheels for collected packages: cython_bbox Building wheel for cython_bbox (setup.py) ... error error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [5 lines of output] running bdist_wheel running build running build_ext building 'cython_bbox' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for cython_bbox Running setup.py clean for cython_bbox Failed to build cython_bbox Installing collected packages: cython_bbox Running setup.py install for cython_bbox ... error error: subprocess-exited-with-error × Running setup.py install for cython_bbox did not run successfully. │ exit code: 1 ╰─> [18 lines of output] running install D:\python\envs\yolov578\lib\site-packages\setuptools\_distutils\cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. !! ******************************************************************************** Please avoid running ``setup.py`` directly. Instead, use pypa/build, pypa/installer, pypa/build or other standards-based tools. See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details. ******************************************************************************** !! self.initialize_options() running build running build_ext building 'cython_bbox' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure × Encountered error while trying to install package. ╰─> cython_bbox note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.
时间: 2023-07-24 17:17:27 浏览: 145
这个错误提示是由于安装cython_bbox时缺少Microsoft Visual C++ 14.0或更高版本,你需要安装该工具才能成功构建cython_bbox。你可以通过以下链接下载并安装Microsoft C++ Build Tools:https://visualstudio.microsoft.com/visual-cpp-build-tools/。安装完成后,再次尝试安装cython_bbox即可。另外,提示中还提到了一些关于setup.py install的警告信息,建议使用其他标准工具来代替直接运行setup.py install。
相关问题
Building wheels for collected packages: pytorch Building wheel for pytorch (setup.py) ... error error: subprocess-exited-with-error
这个错误提示可能是由于在安装PyTorch时编译源代码时遇到了问题。有几种可能的解决方案:
1. 检查您的Python版本是否与PyTorch版本兼容,如果不兼容,请尝试安装与您的Python版本兼容的PyTorch版本。
2. 确保您的计算机已安装了适当的编译工具。请查看PyTorch安装文档中的编译要求。
3. 如果您使用的是Conda环境,请考虑创建一个新环境并在其中安装PyTorch。
4. 尝试使用Anaconda或Miniconda进行安装,这通常会自动解决依赖关系和编译问题。
5. 如果您使用的是Windows系统,请确保已安装Microsoft Visual C++ Redistributable。
如果上述方法仍然无法解决问题,请提供更多详细信息,例如错误消息的完整文本,以便我能够更好地帮助您解决问题。
Building wheels for collected packages: pycocotools Building wheel for pycocotools (setup.py) ... error
如果在安装 pycocotools 时遇到错误,可能是由于缺少一些依赖项或环境配置问题导致的。以下是一些解决方案:
1. 确保已经安装了编译工具和依赖项:
- 对于 Linux 系统,请安装 gcc、g++ 和 make 工具。
- 对于 macOS,请确保安装了 Xcode 命令行工具。可以通过在终端中运行 `xcode-select --install` 来安装它们。
- 对于 Windows 系统,请确保安装了 Microsoft Visual C++ Build Tools。可以从以下链接下载并安装:https://visualstudio.microsoft.com/visual-cpp-build-tools/
2. 在安装之前,尝试更新 Conda 的版本:
```shell
conda update conda
```
3. 尝试使用 pip 安装 pycocotools:
```shell
pip install pycocotools
```
4. 如果上述方法都无效,可以尝试手动编译和安装 pycocotools:
- 在 Conda 环境中安装 Cython:
```shell
conda install cython
```
- 克隆 pycocotools 仓库:
```shell
git clone https://github.com/cocodataset/cocoapi.git
```
- 进入 cocoapi/PythonAPI 目录:
```shell
cd cocoapi/PythonAPI
```
- 编译和安装 pycocotools:
```shell
python setup.py build_ext install
```
如果仍然遇到问题,请提供更详细的错误信息,以便我能够更好地帮助你解决问题。