Unmet dependencies with python3-aiortc

I am getting the following dependency error trying to install python3-aiortc

apt install python3-aiortc
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
python3-aiortc : Depends: python3-av (< 11) but 12.3.0-2+rpt1 is to be installed
E: Unable to correct problems, you have held broken packages.

1 Like

Hi Stuart,

Are you following a particular guide?
Would it be possible to get some more details on your project?

I am using the Raspberry to stream video to a webservice using python picamera2.
This is work well. It displays a view from inside in a browser.
We also have an Open Door button on the web page. This sends a http get to the door intercom to open the door. The door feeds back OK when the latch is released. We display this result.
The Door intercom provides an RTSP stream which I want to display as well (Outsdie view)
I want to use a WebRTC component as other methods to display RTSP on a web page are extremely laggy.
python3-aiortc is one of the modules required for WebRTC.
When I do “apt install python3-aiortc” I get the dependency problem as shown.

The main point is: I should be able to run “apt install python3-aiortc” without an error.

Can you escalate this the Raspberry PI?
Apt should not be throwing dependency errors.

Hi @Stuart145095

Welcome to the forum!

Sorry to hear that you’re having issues with getting that library installed, I’ve just attempted to install it on one of our test Pi5s and was able to do so with no issues.

I would recommend ensuring that you have installed the most recent updates available by running

sudo apt update

and then

sudo apt full-upgrade

Hi Dan,

Thanks for your reply.

I am still getting the failure on my Pi 4b.

It was a new install last month.

Yes I have done the update then upgrade.

Di you run the highlighted command?

root@webcam:~# apt install python3-aiortc

Reading package lists… Done

Building dependency tree… Done

Reading state information… Done

Some packages could not be installed. This may mean that you have

requested an impossible situation or if you are using the unstable

distribution that some required packages have not yet been created

or been moved out of Incoming.

The following information may help to resolve the situation:

The following packages have unmet dependencies:

python3-aiortc : Depends: python3-av (< 11) but 12.3.0-2+rpt1 is to be installed

E: Unable to correct problems, you have held broken packages.

Same on the Pi 5

root@cvt-pi5-8gb:~# root@cvt-pi5-8gb:~# apt install python3-aiortc

Reading package lists… Done

Building dependency tree… Done

Reading state information… Done

Some packages could not be installed. This may mean that you have

requested an impossible situation or if you are using the unstable

distribution that some required packages have not yet been created

or been moved out of Incoming.

The following information may help to resolve the situation:

The following packages have unmet dependencies:

python3-aiortc : Depends: python3-av (< 11) but 12.3.0-2+rpt1 is to be installed

E: Unable to correct problems, you have held broken packages.

I have done the updates too. This is from history on the Pi 5

179 apt update

180 apt full-upgrade -y

181 apt install python3-aiortc

182 reboot

183 apt install python3-aiortc

1 Like

Hi Stuart,

This install might require elevated permissions, I would try
sudo apt install python3-aiortc
And see if that works

1 Like

I am running as root.

Hey @Stuart145095,

That error message reads to me like python3-aiortc is looking for specifically version 11 of python3-av but it can only find version 12.3.0 instead.

As a quick fix you could try to install that specific version of python3-av with
sudo apt install python3-av=11
This solution isn’t ideal as its normally best to use the most recent version of the required packages.

I would back up a few steps and try again to see if reinstalling these packages makes a difference. You could either do this with a completely fresh OS or you could remove the relevant packages with this command
sudo apt remove specific_package_name
and then attempt to reinstall to see if this fixes itself.

Hope this helps!

I tried downgrading python3-av to v11, however, it removed python3-picamera2.
The project I have is a modified version of Video Streaming Raspberry Pi Camera | Random Nerd Tutorials. This requires python3-picamera2
This displays the camera stream on a web page.
This is working very well and I have added a button to open the door via http request (on internal network only)
I have a second rtsp stream I want to display on the same page. The best method is WebRTC. Other methods have proven to be too laggy.
python3-aiortc is required for WebTRC.

1 Like

Hey @Stuart145095,

Sounds like you are on the right track, I’m happy to hear this is working well for you.

Hopefully it’s smooth sailing from here. Otherwise we would be happy to help you figure out any specific issues you encounter in the future :slight_smile:

While I do have the original part of the project working, I still have the original problem.
I want to install python3-aiortc so I can add the WebRTC component.
WebRTC will be used to convert and stream the rtsp video to a browser.

python3-aiortc will not install.
If I try to downgrade python3-av V11, picamera2 is removed because it depends on python3-av V12.

Were you ever able to solve this?

No, I am still running into the dependency problem. I do regular updates to see if this has been resolved. No luck so far.

Have you tried building aiortc from source?