Open lafftar opened 2 years ago
I got this working properly under Ubuntu 22.04, it's not too much of a hassle. You need to install a few Ubuntu deps first, as noted on the pycairo webpages:
sudo apt install libcairo2-dev pkg-config python3-dev
You can then install the pycairo
package :
pip install pycairo
There is one more dependency that is required (on my system at least) to install pygobject
properly:
sudo apt install libgirepository1.0-dev
After all this, pygobject
should just install fine:
pip install pygobject
My uname -a
:Linux DESKTOP-GF8JR20 4.4.0-19041-Microsoft #1237-Microsoft Sat Sep 11 14:32:00 PST 2021 x86_64 x86_64 x86_64 GNU/Linux
My py -v
: Python 3.10.6
I set up the environment according to the above command.And i pip pygobject and pycario successfully.
$ **pip3 install pygobject**
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pygobject in /usr/lib/python3/dist-packages (3.42.1)
Requirement already satisfied: pycairo>=1.16.0 in /usr/lib/python3/dist-packages (from pygobject) (1.20.1)
$ **pip3 install pycairo**
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pycairo in /usr/lib/python3/dist-packages (1.20.1)
But when I try to run
$ **python3 main.py**
playsound is relying on another python subprocess. Please use `pip install pygobject` if you want playsound to run more efficiently.
I don't know what went wrong
My
uname -a
:Linux lafftar 5.13.0-44-generic #49-Ubuntu SMP Wed May 18 13:28:06 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
My
py -V
:Python 3.10.0
I'm trying to fix this warning:
playsound is relying on another python subprocess. Please use 'pip install pygobject' if you want playsound to run more efficiently.
I run
pip install pygobject
, and am greeted with this error:As you can see, the error is initated when building wheels for
pycairo
:No package 'cairo' found
. I went to install pycairo withpip install pycario
, and got this error:I went investigating and stumbled on https://github.com/pygobject/pycairo/issues/212#issuecomment-772429007,
There are no wheels for pycairo outside of windows sadly.
. Do i really have to compile a third party package in order to use playsound?