环境安装

在部署虚拟环境时遇到了cffi和其他的一些软件包无法正常安装的问题

报错大概是这样(主要是忘记保存了)

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

Encountered error while generating package metadata.

See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

具体解决办法:

  1. 更新pip及settools
pip install --upgrade pip
pip install --upgrade setuptools
  1. 缺少VS C++生成工具,需要去官网下载

    网址:https://my.visualstudio.com/Downloads?q=build%20tools

    登陆后搜索 C++ build tools

    找到Visual C++ Build Tools For Visual Studio 2015 修改下载类型为DVD,下载下来之后解压运行exe文件

以上方法基本可以解决此类问题

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐