python3在安装第三方模块rpi.gpio模块是报错如下要怎么解决!!!急求

Collecting rpi.gpio
Using cached https://files.pythonhosted.org/packages/af/2f/407b6e4cc8a0bdf4348
25a160bba1807991886b63cce16a5f1a6e1f24cdf/RPi.GPIO-0.6.5.tar.gz
Installing collected packages: rpi.gpio
Running setup.py install for rpi.gpio … error
ERROR: Complete output from command ‘c:\python37\python.exe’ -u -c ‘import s
etuptools, tokenize;file=’"’"‘C:\Users\MST_JA~1.YAN\AppData\Local\Temp
\pip-install-u4bb14u3\rpi.gpio\setup.py’"’"’;f=getattr(tokenize, ‘"’"‘open’"’"
‘, open)(file);code=f.read().replace(’"’"’\r\n’"’"’, ‘"’"’\n’"’"’);f.close()
;exec(compile(code, file, ‘"’"‘exec’"’"’))’ install --record ‘C:\Users\MST_J
A~1.YAN\AppData\Local\Temp\pip-record-peq0fzyf\install-record.txt’ --single-vers
ion-externally-managed --compile:
ERROR: running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\RPi
copying RPi_init_.py -> build\lib.win-amd64-3.7\RPi
creating build\lib.win-amd64-3.7\RPi\GPIO
copying RPi\GPIO_init_.py -> build\lib.win-amd64-3.7\RPi\GPIO
running build_ext
building ‘RPi._GPIO’ extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\source
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC
14.20.27508\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\pyth
on37\include -Ic:\python37\include “-IC:\Program Files (x86)\Microsoft Visual St
udio\2019\Community\VC\Tools\MSVC\14.20.27508\ATLMFC\include” “-IC:\Program File
s (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\include
" “-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um” “-IE:\Window
s Kits\10\include\10.0.17763.0\ucrt” “-IE:\Windows Kits\10\include\10.0.17763.0
shared” “-IE:\Windows Kits\10\include\10.0.17763.0\um” “-IE:\Windows Kits\10\inc
lude\10.0.17763.0\winrt” “-IE:\Windows Kits\10\include\10.0.17763.0\cppwinrt” /T
csource/py_gpio.c /Fobuild\temp.win-amd64-3.7\Release\source/py_gpio.obj
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\MST_Jason-yyx.Yang\AppData\Local\Temp\pip-install-u4bb14u3\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\Comm
unity\VC\Tools\MSVC\14.20.27508\bin\HostX86\x64\cl.exe’ failed with exit
status 2
----------------------------------------
ERROR: Command “‘c:\python37\python.exe’ -u -c ‘import setuptools, tokenize;fi
le
=’”’”‘C:\Users\MST_JA~1.YAN\AppData\Local\Temp\pip-install-u4bb14u3\r
pi.gpio\setup.py’"’"’;f=getattr(tokenize, ‘"’"‘open’"’"’, open)(file);code=
f.read().replace(’"’"’\r\n’"’"’, ‘"’"’\n’"’"’);f.close();exec(compile(code, fi
le
, ‘"’"‘exec’"’"’))’ install --record ‘C:\Users\MST_JA~1.YAN\AppData\Local\Te
mp\pip-record-peq0fzyf\install-record.txt’ --single-version-externally-managed -
-compile" failed with error code 1 in C:\Users\MST_JA~1.YAN\AppData\Local\Temp\p
ip-install-u4bb14u3\rpi.gpio
WARNING: You are using pip version 19.1, however version 19.1.1 is available.
You should consider upgrading via the ‘python -m pip install --upgrade pip’ comm
and.

你可能感兴趣的:(python3在安装第三方模块rpi.gpio模块是报错如下要怎么解决!!!急求)