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!