error: subprocess-exited-with-error × Running setup.py install for pycocotools did not run successfully. │ exit code: 1 ╰─> [14 lines of output] E:\anaconda\envs\py38\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() 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. ╰─> pycocotools note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.
时间: 2023-08-17 09:04:53 浏览: 436
这个错误提示是在安装pycocotools时出现的。错误提示显示 Microsoft Visual C++ 14.0 或更高版本是必须的。你需要前往 https://visualstudio.microsoft.com/visual-cpp-build-tools/下载和安装Microsoft C++ Build Tools。安装完成后,再尝试安装pycocotools。另外,这个错误提示中也提醒不要直接运行setup.py,可以使用pypa/build、pypa/installer、pypa/build或其他符合标准的工具。
相关问题
[end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for M2Crypto Running setup.py clean for M2Crypto Failed to build M2Crypto Installing collected packages: M2Crypto Running setup.py install for M2Crypto ... error error: subprocess-exited-with-error × Running setup.py install for M2Crypto did not run successfully. │ exit code: 1 ╰─> [72 lines of output]
看起来在安装M2Crypto时出现了错误。你可以尝试以下步骤来解决这个问题:
1. 确认你的系统上已经安装了OpenSSL,如果没有安装,可以使用以下命令来安装:
```
sudo apt-get install openssl
```
2. 安装M2Crypto之前,先安装SWIG。SWIG是一个开源软件开发工具,它连接编程语言和C/C++库。
```
sudo apt-get install swig
```
3. 确认你的系统上已经安装了Python开发库。如果没有安装,可以使用以下命令来安装:
```
sudo apt-get install python-dev
```
4. 最后,重新安装M2Crypto。
```
pip install --upgrade --force-reinstall M2Crypto
```
以上步骤应该可以解决M2Crypto安装失败的问题。如果问题仍然存在,请提供更多的错误信息,以便我们更好地帮助你解决问题。
Preparing metadata (setup.py) ... done Building wheels for collected packages: dlib Building wheel for dlib (setup.py) ... error error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [7 lines of output] running bdist_wheel running build running build_py running build_ext ERROR: CMake must be installed to build dlib [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for dlib Running setup.py clean for dlib Failed to build dlib Installing collected packages: dlib Running setup.py install for dlib ... error error: subprocess-exited-with-error × Running setup.py install for dlib did not run successfully. │ exit code: 1 ╰─> [9 lines of output] running install D:\Anaconda3\Anaconda\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py running build_ext ERROR: CMake must be installed to build dlib [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. ╰─> dlib note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.
这个错误是因为缺少CMake,dlib需要使用CMake进行编译。您需要先安装CMake,然后再重新安装dlib库。以下是在Windows上安装CMake和dlib的步骤:
1. 下载CMake安装程序:您可以从CMake的官方网站 https://cmake.org/download/ 下载适合您的操作系统的CMake安装程序。
2. 安装CMake:运行下载的CMake安装程序,按照提示进行安装。
3. 安装dlib库:在命令行中输入以下命令来安装dlib库:
```
pip install dlib
```
如果您已经安装了dlib库,可以使用以下命令卸载它:
```
pip uninstall dlib
```
然后再重新安装dlib库:
```
pip install dlib
```
如果您还遇到了其他问题,请参考dlib的文档或在dlib的GitHub页面上查找更多信息。
阅读全文