天天看點

error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++ Build Tools“:

一、某些包死活裝不上去

error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Failed building wheel for ujson
Failed to build ujson
ERROR: Could not build wheels for ujson which use PEP 517 and cannot be installed directly
           

二、解決方案

2020-12-29更新, 因為我又遇到啦

  • 心路曆程,本人曾遇到這樣解決方案
  1. pip install ujson

    又上面那種錯誤
  2. 切換安裝版本也不靈了(本人曾這樣解決過

    pip install bcrypt

    問題,

    pip install bcrypt==3.2.0

    切換到bcrypt==3.1.7)
  3. 那就切換源試一下,阿裡,清華,豆瓣的源都不行,報錯解決不了
  4. 我下載下傳whl包, 進行這樣pip install ***.whl安裝仍然報錯(本人曾這樣解決過

    pip install scrapy.whl

    問題)
  5. 那我下載下傳壓縮包ujson.tar.gz 進行解壓進行python setup,報錯呀(本人曾這樣解決過

    pip install pycrypto

    問題)
  6. 隻好考慮

    error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

  • 解決方案

    python3 是用 VC++ 14 及以上編譯, python27 是 VC++ 9 編譯的

    python3下載下傳 Visual Studio 2015

    error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++ Build Tools“:

三、之前pip install pycrypto也遇到這種方種錯誤,也有相應解決辦法,感興趣的可以看一下

情況就是不靈那個靈,找誰說理去
           

最後這是我第五次遇到這種問題啦,如果幫你解決點贊,評論呗

繼續閱讀