0
Whenever I try to play a sound in python with playsound this error always occurs input: import playsound playsound("tes.wav")
Output: modulenotfounderror:no module named 'gi'
14 odpowiedzi
+ 3
Yup you need to install module gi or maybe the name is wrong
+ 1
It is playsound not Playsound
also for gi ,the actual module name is pgi or gi ,I really can't tell even after researching a lot about it on Google
+ 1
Here is a link which I came across tho ,not sure if it will help
https://stackoverflow.com/questions/44213921/JUMP_LINK__&&__python__&&__JUMP_LINK-3-installing-gi-package-with-pip
+ 1
You could search for the required library depending on the platform you're using if you don't have them and it wouldn't be that hard
+ 1
You can use thinkdsp library and make_audio function for make a sound....
0
Thanks
0
When I pip install gi it says could not find a version that satisfies the requirement gi (from versions:) no matching distribution found for gi
And when I tried to import playsound with the p as a capital letter
I got an error that said modulenotfounderror:no module named 'Playsound'
0
Could it be happening because I'm using android?
0
Traceback (most recent call last):
File "/data/user/0/ru.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 31, in <module>
start(fakepyfile,mainpyfile)
File "/data/user/0/ru.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 30, in start
exec(open(mainpyfile).read(), __main__.__dict__)
File "<string>", line 3, in <module>
File "/data/user/0/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.7/site-packages/playsound.py", line 91, in _playsoundNix
import gi
ModuleNotFoundError: No module named 'gi'
[Program finished]
0
/storage/emulated/0 $ pip install gi
Collecting gi
Could not find a version that satisfies the requirement gi (from versions: )
No matching distribution found for gi
/storage/emulated/0 $
0
Traceback (most recent call last):
File "/data/user/0/ru.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 31, in <module>
start(fakepyfile,mainpyfile)
File "/data/user/0/ru.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 30, in start
exec(open(mainpyfile).read(), __main__.__dict__)
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'Playsound'
[Program finished]
0
Traceback (most recent call last):
File "/data/user/0/ru.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 31, in <module>
start(fakepyfile,mainpyfile)
File "/data/user/0/ru.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 30, in start
exec(open(mainpyfile).read(), __main__.__dict__)
File "<string>", line 3, in <module>
NameError: name 'Playsound' is not defined
[Program finished]
0
Thanks amir5625
0
Nicolas okiokpa if you have solved then please tell again the whole process how you have solved in Android