LoginSignup
72
50

More than 5 years have passed since last update.

Pythonのpipインストールエラーでハマった話[Windows]

Last updated at Posted at 2018-07-03

概要

Windows 10にて pip install時のMicrosoft Visual C++ 14.0 is required.ってエラーにハマったので最近の解決法を載せておきます。

エラー内容

windowsにてPythonでIBM WatsonのSpeech To Textを使いたかったのでWatson-Speech_To_Textを読みながら

pip install --upgrade "watson-developer-cloud>=1.4.0"

をすると

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

そのあとに赤文字でなんやかんや...
しかもURLは「Not Found...」

解決法

Build Tools for Visual Studio 2017からVisual C++ Build ToolsWindows 10 SDKをインストールする。

Build Tools for Visual Studio 2017をダウンロードする。
https://visualstudio.microsoft.com/ja/downloads/
上記サイトの少し下にある
「Tools for Visual Studio 2017」の中にある「Build Tools for Visual Studio 2017」をダウンロード。

起動後自動でインストールやら何やら始まるので少し待つ...

しばらくしてウィンドウが表示されたら一番上の「Visual C++ Build Tools」にチェックを入れて右側の「概要」より、オプション一番上の「Windows 10 SDK(xx.x.xxxx)」に最低限チェックが入っていることを確認して、インストール。

再度

pip install --upgrade "watson-developer-cloud>=1.4.0"

を実行。Successfully!やったー!

まとめ

windowsのpipインストール時のエラーについて、build toolsをインストールすることで解決できることを書きました。errorメッセージのリンクがフェイクで騙された...orz。調べても2015とかの情報が多くて、別のbuild toolsをインストールしても別のエラーでハマってしまったので、解決できた状況をまとめました。2018年6月現在です。

参考文献

72
50
6

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
72
50