Windows平台上,pip install fastFM scrapy等工具的時候,經常出現 error Microsoft Visual C++ 14.0 is required 的錯誤,
原因是部分python包是使用c或者c++編寫的,因此在安裝的時候需要使用 c++生成工具集。
解決方案有兩個:
-
安裝vc++ 14 build tools :
-
安裝 visual studio 最新版, 選擇 vc++ build tools 和 windows sdk 10
-
最關鍵: 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:)