以下のエラーが出た
1 |
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/ |
とりあえず表示されているURL(https://visualstudio.microsoft.com/downloads/)にアクセスし Build Tools for Visual Studio 2019 をダウンロード
Build ツールを選択したら5GB程度必要と表示されたけど、何が必要なのか調べるのが面倒なので、そのままインストール。
DL始まったのを見ていたところ、Visual Studio Build Tools 2019は1.26GBらしい。
でかくない?
インストール終わったあたりで再起動を求められたので再起動。
再起動後、再度pipを実行したところ、エラーが増えた・・・
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
<span style="color: #ff0000;">エラー: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.27.29110\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2</span> py_gpio.c source/py_gpio.c(87): error C2143: 構文エラー: ';' が '{' の前にありません。 source/py_gpio.c(115): warning C4244: '=': 'Py_ssize_t' から 'int' への変換です。データが失われる可能性があります。 source/py_gpio.c(119): warning C4244: '=': 'Py_ssize_t' から 'int' への変換です。データが失われる可能性があります。 source/py_gpio.c(200): error C2143: 構文エラー: ';' が '{' の前にありません。 source/py_gpio.c(227): warning C4047: 'return': 間接参照のレベルが 'PyObject *' と 'int' で異なっています。 source/py_gpio.c(289): warning C4244: '=': 'Py_ssize_t' から 'int' への変換です。データが失われる可能性があります。 source/py_gpio.c(291): warning C4244: '=': 'Py_ssize_t' から 'int' への変換です。データが失われる可能性があります。 source/py_gpio.c(345): error C2373: 'output': 再定義されています。異なる型修飾子です。 C:\Users\gon-f\AppData\Local\Temp\pycharm-packaging\RPi.GPIO\source\constants.h(29): note: 'output' の宣言を確認してください source/py_gpio.c(345): error C2143: 構文エラー: ';' が '{' の前にありません。 source/py_gpio.c(359): warning C4047: 'return': 間接参照のレベルが 'PyObject *' と 'int' で異なっています。 source/py_gpio.c(406): warning C4244: '=': 'Py_ssize_t' から 'int' への変換です。データが失われる可能性があります。 source/py_gpio.c(408): warning C4244: '=': 'Py_ssize_t' から 'int' への変換です。データが失われる可能性があります。 source/py_gpio.c(410): warning C4244: '=': 'Py_ssize_t' から 'int' への変換です。データが失われる可能性があります。 source/py_gpio.c(412): warning C4244: '=': 'Py_ssize_t' から 'int' への変換です。データが失われる可能性があります。 error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.27.29110\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2 |
RaspberryPiで使うコードだからWindowsでデバッグするのは諦めよう。