Errors when installing aiortc from git on Windows


When I was trying to install aiortc on windows I got stuck with multiple errors. When you just do pip install . you will not get a working version:

c1083: cannot open include file: 'opus/opus.h': no such file or directory
'vcpkg' is not recognized as an internal or external command

To fix those errors you need to install the native libraries by the script provided by aiortc-codecs. Also you will need build tools etc.

If you have no build tools installed you can install them. Run the visual studio installer

and opt those packages:


You also need to install vcpkg. Download from git: git clone https://github.com/Microsoft/vcpkg.git, run the install script: .\vcpkg\bootstrap-vcpkg.bat and add it to path by using "Edit environment variables"
Double tab on Path and add vcpkg folder to the list, it should have vcpkg.exe file in it:
Reboot your pc, or reopen the cmd so it has Path updated.

Now we need to use the dependency installer script from https://github.com/aiortc/aiortc-codecs. Download as zip and run .\scripts\build-codecs.bat. Now you should have all the required dependencies installed and can install aiortc using pip (pip install .).

Or you can try using compiled codecs from the aiocodecs repository: python scripts\fetch-vendor.py C:\cibw\vendor. Then you need to set the lib path: INCLUDE=C:\\cibw\\vendor\\include LIB=C:\\cibw\\vendor\\lib, and you can install aiortc using pip without errors.

Комментарии

Популярные сообщения из этого блога

DOS атака при помощи Python

Взлом почты mail.ru live.com и yahoo.com

Ведем телеграм канал через питон