Visual StudioのPythonでは、私が知っている限り、Cソースコンパイルを必要としないパッケージをインストールできます。コンパイルが必要なパッケージに関しては、常に失敗します。インストールの試行は、常にpip install package-name
でVisual Studio内で行われます。Cソースコンパイルが必要なパッケージでPythonパッケージのインストールに失敗する(Visual Studio 2017)
- は
- のVisual Studio 2015(VS 14.0)C/C++スタンドアロンコンパイラをインストールした後、マシンを再起動
- に失敗し、まだ、コンパイラのインストール後に再インストールパッケージに試してみてください。これは私がしようとしているものです :まだ具体的に
に失敗し、パッケージを再インストールしようと、私はRPIO
とRPi.GPIO
は、多かれ少なかれ、それは同様のエラーメッセージを与えるインストールしようとしていますここでは
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
はRPIO
インストール試行からの完全なログです:
----- Installing 'RPIO==0.10.0' -----
Collecting RPIO==0.10.0
Using cached RPIO-0.10.0.tar.gz
Installing collected packages: RPIO
Running setup.py install for RPIO: started
Running setup.py install for RPIO: finished with status 'error'
Complete output from command "C:\Program Files\Python36\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\ELEMEN~1\\AppData\\Local\\Temp\\pip-build-4lvb_8wu\\RPIO\\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\ELEMEN~1\AppData\Local\Temp\pip-oqz8bi8d-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\RPIO
copying source\RPIO\Exceptions.py -build\lib.win-amd64-3.6\RPIO
copying source\RPIO\_RPIO.py -build\lib.win-amd64-3.6\RPIO
copying source\RPIO\__init__.py -build\lib.win-amd64-3.6\RPIO
creating build\lib.win-amd64-3.6\RPIO\PWM
copying source\RPIO\PWM\__init__.py -build\lib.win-amd64-3.6\RPIO\PWM
running build_ext
building 'RPIO._GPIO' extension
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
creating build\temp.win-amd64-3.6\Release\source
creating build\temp.win-amd64-3.6\Release\source\c_gpio
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD "-IC:\Program Files\Python36\include" "-IC:\Program Files\Python36\include" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\winrt" /Tcsource/c_gpio/py_gpio.c /Fobuild\temp.win-amd64-3.6\Release\source/c_gpio/py_gpio.obj
py_gpio.c
source/c_gpio/py_gpio.c(361): error C2373: 'setmode': redefinition; different type modifiers
C:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\ucrt\corecrt_io.h(528): note: see declaration of 'setmode'
source/c_gpio/py_gpio.c(431): warning C4028: formal parameter 1 different from declaration
source/c_gpio/py_gpio.c(431): warning C4028: formal parameter 2 different from declaration
source/c_gpio/py_gpio.c(431): warning C4047: 'initializing': 'PyCFunction' differs in levels of indirection from 'int (__cdecl *)(int,int)'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
----------------------------------------
Command ""C:\Program Files\Python36\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\ELEMEN~1\\AppData\\Local\\Temp\\pip-build-4lvb_8wu\\RPIO\\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\ELEMEN~1\AppData\Local\Temp\pip-oqz8bi8d-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\ELEMEN~1\AppData\Local\Temp\pip-build-4lvb_8wu\RPIO\
----- Failed to install 'RPIO==0.10.0' -----
は、だから私は何かが足りないのですか?それとも、何か不足しているパッケージのソースですか?
は
ビジュアルスタジオ用にPythonをインストールしましたか? – babygame0ver
@AkshayKathpalはい、もちろんです。 –
'py_gpio.c'のソースを見て、コンパイラエラーメッセージが何を不満しているかをさらに調べましたか?作者がWindowsでそれを構築しようと試みたことはない可能性があります。 – martineau