问题

Window Command输入​​pip install wordcloud​​报错,一片红

"error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools":" 这个不是必需

解决

在网上搜索到解决方案:​​https://github.com/amueller/word_cloud/issues/105#issuecomment-287332742​

把步骤整理一下:

  1. ​https://www.lfd.uci.edu/~gohlke/pythonlibs/#wordcloud​​ 下载对应的版本,与本地的Python版本保持一致

Failed building wheel for wordcloud(window安装pip install wordcloud报错)_报错

  1. 怎么判断自己是amd还是intel?有一个比较简单的方法,在Window Command输入Python,像下图这样
    Failed building wheel for wordcloud(window安装pip install wordcloud报错)_c++_02
  2. 找到你要下载的版本后,然后下载到本地,比如我这里下载到Python39目录下
    Failed building wheel for wordcloud(window安装pip install wordcloud报错)_报错_03
  3. 使用pip安装刚刚下载的whl文件
    python -m pip install wordcloud-1.8.1-cp39-cp39-win_amd64.whl
    或者pip install wordcloud-1.8.1-cp39-cp39-win_amd64.whl

最后安装成功~