I've installed flet through "pip install flet" from the terminal on Ubuntu. Upon running the basic flet code, just to check whether it worked this pops up:
error while loading shared libraries: libmpv.so.1: cannot open shared object file: No such file or directory
The code I ran is:
import flet as ft
def main(page: ft.Page):
# add/update controls on Page
pass
ft.app(target=main)
I also followed the Linux system instructions from terminal to install flet:
sudo apt-get update
sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev 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`
What can I try next? I'm relatively new to Ubuntu.
I expected a basic flet window to pop up, and not an error from the terminal. Something like:

Instead I got the error:
error while loading shared libraries: libmpv.so.1: cannot open shared object file: No such file or directory
In Ubuntu 24.04 LTS, I got the same error and solved it with this:
sudo apt update
sudo apt install libmpv-dev libmpv2
sudo ln -s /usr/lib/x86_64-linux-gnu/libmpv.so /usr/lib/libmpv.so.1
Credit to this YouTube tutorial.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With