prabhakar-sivanesan / OpenCV-rtsp-server

RTSP streaming using GStreamer
177 stars 62 forks source link

prerequisites question #9

Open quammy opened 2 years ago

quammy commented 2 years ago

Hi, thanks for your code!

I fail to run your code as the gi package cannot be found. I understand it requires the python packages PyGObject and pycairo. The environment is a docker container of python:3.9.2-slim-buster.

On the Dockerfile I have the following install commands:

RUN apt-get update && apt-get install -y
RUN apt-get install ffmpeg libsm6 libxext6 -y
RUN apt-get install libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio -y
RUN apt-get install libglib2.0-dev libgstrtspserver-1.0-dev gstreamer1.0-rtsp -y

RUN pip install opencv-python
RUN pip install pycairo
RUN pip install PyGObject

and then I added also RUN apt-get install libcairo2 -y just before the pip commands and also other intents but they all fail with:

#11 28.26 Building wheels for collected packages: pycairo
#11 28.27   Building wheel for pycairo (pyproject.toml): started
#11 30.94   Building wheel for pycairo (pyproject.toml): finished with status 'error'
#11 30.96   error: subprocess-exited-with-error
#11 30.96
#11 30.96   × Building wheel for pycairo (pyproject.toml) did not run successfully.
#11 30.96   │ exit code: 1
#11 30.96   ╰─> [17 lines of output]
#11 30.96       running bdist_wheel
#11 30.96       running build
#11 30.96       running build_py
#11 30.96       creating build
#11 30.96       creating build/lib.linux-x86_64-cpython-39
#11 30.96       creating build/lib.linux-x86_64-cpython-39/cairo
#11 30.96       copying cairo/__init__.py -> build/lib.linux-x86_64-cpython-39/cairo
#11 30.96       copying cairo/__init__.pyi -> build/lib.linux-x86_64-cpython-39/cairo
#11 30.96       copying cairo/py.typed -> build/lib.linux-x86_64-cpython-39/cairo
#11 30.96       warning: build_py: byte-compiling is disabled, skipping.
#11 30.96
#11 30.96       running build_ext
#11 30.96       Package cairo was not found in the pkg-config search path.
#11 30.96       Perhaps you should add the directory containing `cairo.pc'
#11 30.96       to the PKG_CONFIG_PATH environment variable
#11 30.96       No package 'cairo' found
#11 30.96       Command '['pkg-config', '--print-errors', '--exists', 'cairo >= 1.15.10']' returned non-zero exit status 1.
#11 30.96       [end of output]
#11 30.96
#11 30.96   note: This error originates from a subprocess, and is likely not a problem with pip.
#11 30.96   ERROR: Failed building wheel for pycairo
#11 30.96 Failed to build pycairo
#11 30.96 ERROR: Could not build wheels for pycairo, which is required to install pyproject.toml-based projects

Any idea how to solve this?

Thanks!

attila-kovacs-technolynx commented 12 months ago

https://stackoverflow.com/questions/70508775/error-could-not-build-wheels-for-pycairo-which-is-required-to-install-pyprojec