安装Word2Vec时遇到的问题。
error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++ Build Tools“: h
1. 问题描述:在pip install Word2Vec后遇到报错:error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++ Build Tools”: h
2. 问题原因:
- 这是因为Word2Vec中用到了一些C++接口,因此需要安装C++编译器才行。
3. 解决办法:安装C++编译器
如果安装 Visual Studio 需要十几个G,为了减少不必要的下载,我们通过Microsoft Visual C++ Build Tools来解决
-
3.1 下载安装工具: Microsoft Visual C++ Build Tools下载地址:https://visualstudio.microsoft.com/zh-hans/downloads/
进入页面下载即可:选择比较早的版本——可在发行组件和生成工具——Microsoft 生成工具 2015 更新 3:
-
3.2 下载后得到:visualcppbuildtools_full.exe文件,双击运行。
根据需要进行选择,自动安装
4. 注意:安装包丢失
安装visualcppbuildtools_full.exe过程中如果遇到报错:安装包丢失。解决办法可参考:win10 安装visual studio C++ build tools 【visualcppbuildtools_full.exe】提示安装包丢失 毁坏