如何在Windows上安装AIORTC(用于Python的WebRTC / ObjectRTC绑定)?当我执行pip install aiortc安装时,出现以下错误:
我有从他们的网页获得的lib opus源代码,但是我可以放在哪里?如果我了解此错误,则无法在包含路径中找到c标头。
任何建议将不胜感激。
C:\Users\jmh>pip install aiortc
Collecting aiortc
Downloading https://files.pythonhosted.org/packages/d3/36/33ac9464f02198e0adbfc47f8a1106c09681750646efab1994e578b08f96/aiortc-0.9.3.tar.gz (1.1MB)
100% |████████████████████████████████| 1.1MB 9.3MB/s
Collecting aioice<0.7.0,>=0.6.0 (from aiortc)
Downloading https://files.pythonhosted.org/packages/01/57/a006fbb72ea5d3d428eb1243927c864cd8df64b09db84ba12906934a87aa/aioice-0.6.4-py3-none-any.whl
Requirement already satisfied: attrs in c:\users\jmh\anaconda3\lib\site-packages (from aiortc) (17.4.0)
Collecting crcmod (from aiortc)
Downloading https://files.pythonhosted.org/packages/6b/b0/e595ce2a2527e169c3bcd6c33d2473c1918e0b7f6826a043ca1245dd4e5b/crcmod-1.7.tar.gz (89kB)
100% |████████████████████████████████| 92kB 6.2MB/s
Collecting cryptography>=2.2 (from aiortc)
Downloading https://files.pythonhosted.org/packages/9e/93/1309bdc65b757bc6318fe835ce9388a2e23e47d3eca93f5834f1d7df70bb/cryptography-2.3-cp36-cp36m-win_amd64.whl (1.3MB)
100% |████████████████████████████████| 1.3MB 7.9MB/s
Collecting pyee (from aiortc)
Downloading https://files.pythonhosted.org/packages/8e/06/10c18578e2d8b9cf9902f424f86d433c647ca55e82293100f53e6c0afab4/pyee-5.0.0-py2.py3-none-any.whl
Collecting pylibsrtp>=0.5.0 (from aiortc)
Downloading https://files.pythonhosted.org/packages/bb/6d/9dddce7658bef12d2b9625e9a1905fab12d2d7252ecffa6729080bf8dc10/pylibsrtp-0.5.5-cp36-cp36m-win_amd64.whl (48kB)
100% |████████████████████████████████| 51kB 4.2MB/s
Requirement already satisfied: pyopenssl in c:\users\jmh\anaconda3\lib\site-packages (from aiortc) (17.5.0)
Collecting netifaces (from aioice<0.7.0,>=0.6.0->aiortc)
Downloading https://files.pythonhosted.org/packages/00/ba/227e378b815a075bbda86e516e31d55430abdaa32941b72144117f7a8999/netifaces-0.10.7-cp36-cp36m-win_amd64.whl
Requirement already satisfied: cffi!=1.11.3,>=1.7 in c:\users\jmh\anaconda3\lib\site-packages (from cryptography>=2.2->aiortc) (1.11.4)
Requirement already satisfied: six>=1.4.1 in c:\users\jmh\appdata\roaming\python\python36\site-packages (from cryptography>=2.2->aiortc) (1.11.0)
Requirement already satisfied: asn1crypto>=0.21.0 in c:\users\jmh\anaconda3\lib\site-packages (from cryptography>=2.2->aiortc) (0.24.0)
Requirement already satisfied: idna>=2.1 in c:\users\jmh\anaconda3\lib\site-packages (from cryptography>=2.2->aiortc) (2.6)
Requirement already satisfied: pycparser in c:\users\jmh\anaconda3\lib\site-packages (from cffi!=1.11.3,>=1.7->cryptography>=2.2->aiortc) (2.18)
Building wheels for collected packages: aiortc, crcmod
Running setup.py bdist_wheel for aiortc ... error
Complete output from command c:\users\jmh\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\jmh\\AppData\\Local\\Temp\\pip-install-0twgblb0\\aiortc\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\jmh\AppData\Local\Temp\pip-wheel-7xd9rp4p --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\aiortc
copying aiortc\exceptions.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\jitterbuffer.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\mediastreams.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcconfiguration.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcdatachannel.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcdtlstransport.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcicetransport.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcpeerconnection.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcrtpparameters.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcrtpreceiver.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcrtpsender.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcrtptransceiver.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcsctptransport.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcsessiondescription.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtp.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\sdp.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\stats.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\utils.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\__init__.py -> build\lib.win-amd64-3.6\aiortc
creating build\lib.win-amd64-3.6\aiortc\codecs
copying aiortc\codecs\g711.py -> build\lib.win-amd64-3.6\aiortc\codecs
copying aiortc\codecs\opus.py -> build\lib.win-amd64-3.6\aiortc\codecs
copying aiortc\codecs\vpx.py -> build\lib.win-amd64-3.6\aiortc\codecs
copying aiortc\codecs\__init__.py -> build\lib.win-amd64-3.6\aiortc\codecs
running build_ext
generating cffi module 'build\\temp.win-amd64-3.6\\Release\\aiortc.codecs._vpx.c'
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
generating cffi module 'build\\temp.win-amd64-3.6\\Release\\aiortc.codecs._opus.c'
building 'aiortc.codecs._opus' extension
creating build\temp.win-amd64-3.6\Release\build
creating build\temp.win-amd64-3.6\Release\build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release\build\temp.win-amd64-3.6\Release
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\jmh\anaconda3\include -Ic:\users\jmh\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.14.26428\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.14.26428\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tcbuild\temp.win-amd64-3.6\Release\aiortc.codecs._opus.c /Fobuild\temp.win-amd64-3.6\Release\build\temp.win-amd64-3.6\Release\aiortc.codecs._opus.obj
aiortc.codecs._opus.c
build\temp.win-amd64-3.6\Release\aiortc.codecs._opus.c(493): fatal error C1083: Cannot open include file: 'opus/opus.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
Failed building wheel for aiortc
Running setup.py clean for aiortc
Running setup.py bdist_wheel for crcmod ... done
Stored in directory: C:\Users\jmh\AppData\Local\pip\Cache\wheels\50\24\4d\4580ca4a299f1ad6fd63443e6e584cb21e9a07988e4aa8daac
Successfully built crcmod
Failed to build aiortc
Installing collected packages: netifaces, aioice, crcmod, cryptography, pyee, pylibsrtp, aiortc
Found existing installation: cryptography 2.1.4
Uninstalling cryptography-2.1.4:
Successfully uninstalled cryptography-2.1.4
Running setup.py install for aiortc ... error
Complete output from command c:\users\jmh\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\jmh\\AppData\\Local\\Temp\\pip-install-0twgblb0\\aiortc\\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\jmh\AppData\Local\Temp\pip-record-9v5v3hnf\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\aiortc
copying aiortc\exceptions.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\jitterbuffer.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\mediastreams.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcconfiguration.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcdatachannel.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcdtlstransport.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcicetransport.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcpeerconnection.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcrtpparameters.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcrtpreceiver.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcrtpsender.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcrtptransceiver.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcsctptransport.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcsessiondescription.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtp.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\sdp.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\stats.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\utils.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\__init__.py -> build\lib.win-amd64-3.6\aiortc
creating build\lib.win-amd64-3.6\aiortc\codecs
copying aiortc\codecs\g711.py -> build\lib.win-amd64-3.6\aiortc\codecs
copying aiortc\codecs\opus.py -> build\lib.win-amd64-3.6\aiortc\codecs
copying aiortc\codecs\vpx.py -> build\lib.win-amd64-3.6\aiortc\codecs
copying aiortc\codecs\__init__.py -> build\lib.win-amd64-3.6\aiortc\codecs
running build_ext
generating cffi module 'build\\temp.win-amd64-3.6\\Release\\aiortc.codecs._vpx.c'
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
generating cffi module 'build\\temp.win-amd64-3.6\\Release\\aiortc.codecs._opus.c'
building 'aiortc.codecs._opus' extension
creating build\temp.win-amd64-3.6\Release\build
creating build\temp.win-amd64-3.6\Release\build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release\build\temp.win-amd64-3.6\Release
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\jmh\anaconda3\include -Ic:\users\jmh\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.14.26428\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.14.26428\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tcbuild\temp.win-amd64-3.6\Release\aiortc.codecs._opus.c /Fobuild\temp.win-amd64-3.6\Release\build\temp.win-amd64-3.6\Release\aiortc.codecs._opus.obj
aiortc.codecs._opus.c
build\temp.win-amd64-3.6\Release\aiortc.codecs._opus.c(493): fatal error C1083: Cannot open include file: 'opus/opus.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
Command "c:\users\jmh\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\jmh\\AppData\\Local\\Temp\\pip-install-0twgblb0\\aiortc\\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\jmh\AppData\Local\Temp\pip-record-9v5v3hnf\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\jmh\AppData\Local\Temp\pip-install-0twgblb0\aiortc\
C:\Users\jmh>
答案 0 :(得分:0)
根据aiortc的github页面,当前不支持Windows 10。