error Microsoft Visual C++ 14.0 is required 解决方案

Windows平台上,pip install fastFM  scrapy等工具的时候,经常出现 error Microsoft Visual C++ 14.0 is required 的错误,
 
 
原因是部分python包是使用c或者c++编写的,因此在安装的时候需要使用 c++生成工具集。
 
解决方案有两个:
  1. 到  https://www.lfd.uci.edu/~gohlke/pythonlibs 下载编译好的包
 
  1. 安装vc++ 14 build tools :
    1. 安装 visual studio 最新版, 选择 vc++ build tools 和 windows sdk 10
    2. 最关键: pip install --upgrade setuptools  才能自动发现 vc++ compilers ( Before do anything, install or upgrade the Setuptools Python package. It contain compatibility improvements and add automatic use of compilers:)
 
 
 
 

猜你喜欢

转载自www.cnblogs.com/ToDoToTry/p/11970611.html