Python Confusion Using Virtual Environment

Thread Starter

ErnieM

Joined Apr 24, 2011
8,415
I'm presently working on a Python application on my Raspberry Pi. I would love to use the playsound module but Python is tossing me errors:

"playsound is relying on another python subprocess. Please use "pip install pygobject" if you want playsound to run more efficiently."

However, running "pip install pygobject" fails. I'm using the system shell from the Thonny menu.

I am just lost and my Google-foo is leaving me more confused than ever.
 

Futurist

Joined Apr 8, 2025
731
I'm presently working on a Python application on my Raspberry Pi. I would love to use the playsound module but Python is tossing me errors:

"playsound is relying on another python subprocess. Please use "pip install pygobject" if you want playsound to run more efficiently."

However, running "pip install pygobject" fails. I'm using the system shell from the Thonny menu.

I am just lost and my Google-foo is leaving me more confused than ever.
I feel your pain, many of these setups are appallingly fragile and idiosyncratic. I recently got talked into setting up VS Code for Javascript and it ended up installing a monster called Node.js (perhaps the most stupidly named technology ever) which aborted cryptically halfway through.

I've not used Python much at all, but do know that indentation is part of the language, so copy and paste can do "interesting" things.

Try asking Copilot though, its been a huge help to me recently with these kinds of problems.
 

Thread Starter

ErnieM

Joined Apr 24, 2011
8,415
Final answer: apparently I have been setting up the managed environments correctly. The issue was before I had that down I botched the install of the playsound module. However, there are several other similar modules that can be used, such as pydub. I have successfully installed that one and can finally play sounds on my Pi.

Thanks to everyone who look at this for me.
 
Top