Ubuntu安装Python3.12安装PJSUA2
系统版本:Ubuntu 22.04.3 LTS
sudo apt install build-essential python3-dev python3-setuptools \libasound2-dev libpulse-dev libssl-dev libogg-dev libv4l-dev \libx11-dev libxv-dev libncurses5-dev libxml2-dev libsqlite3-dev \libsqlite3-0 libz-devwget https://github.com/pjsip/pjproject/archive/refs/tags/2.15.tar.gz -O pjproject-2.15.tar.gztar -xzf pjproject2.15.tar.gzcd pjproject-2.15/./configure --enable-shared --enable-python --disable-video CFLAGS="-fPIC" CXXFLAGS="-std=c++11 -fPIC" LDFLAGS="-lstdc++"make dep && makesudo make installsudo ldconfigcd pjsip-apps/src/swig# 此处使用的是 绝对路径,请注意替换自己的真实路径
swig -python -c++ -I/backup/pjproject-2.15/pjsip/include -I/backup/pjproject-2.15/pjlib/include -o pjsua2_wrap.cpp pjsua2.icp pjsua2_wrap.cpp ./python/
cp pjsua2.py ./python/
cp pjsua2_wrap.h ./python/
cd python/python3 setup.py buildpython3 setup.py install