Open sclzzhanghaijun opened 6 years ago
问题解决了吗?我也是同样的问题
sudo apt-get install librtmp-dev sudo pip install python-librtmp
apt-get cannot be used on windows
没有,windows上安装还是有问题
librtmp工程中有个子目录叫librtmp,该子目录中有头文件,所以将该 librtmp 子目录整个放到 pip install 时会去寻找的头文件路径中。比如运行 pip install python-librtmp 之后,控制台会输出 ... -Id:\program files\python3.9.6\include,其中 -l 后面就是 pip install 时会去寻找的头文件路径。将上面提到的 librtmp 子目录,整个放入 ...\python3.9.6\include\ 下就可以了。这个其实还是遵循了 gcc 的编译规则。
python setup.py install
pip install python-librtmp
and run your demo code.brew install rtmpdump
git clone https://github.com/yixia/librtmp.git
sudo cp -rf librtmp/librtmp /usr/local/lib/
sudo cp -rf /opt/homebrew/opt/rtmpdump/lib/* /usr/local/lib/
mkdir -p $your-python-folder/include # eg ./venv/include
cp -rf /opt/homebrew/opt/rtmpdump/include/ $your-python-folder/include
pip install --global-option=build_ext --global-option="-I/opt/homebrew/opt/rtmpdump/include/" --global-option="-L/opt/homebrew/opt/rtmpdump/lib" python-librtmp
librtmp._librtmp.c build\temp.win-amd64-3.7\Release\librtmp._librtmp.c(493): fatal error C1083: Cannot open include file: 'librtmp/rtmp.h': No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2