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'

1st Jun 2020, 4:20 PM
Nicolas okiokpa
Nicolas okiokpa - avatar
14 ответов
+ 3
Yup you need to install module gi or maybe the name is wrong
1st Jun 2020, 4:22 PM
Abhay
Abhay - avatar
+ 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
1st Jun 2020, 4:47 PM
Abhay
Abhay - avatar
1st Jun 2020, 4:50 PM
Abhay
Abhay - avatar
+ 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
2nd Jun 2020, 8:15 AM
amir5625
amir5625 - avatar
+ 1
You can use thinkdsp library and make_audio function for make a sound....
3rd Jun 2020, 11:42 AM
Bharti
Bharti - avatar
0
Thanks
1st Jun 2020, 4:22 PM
Nicolas okiokpa
Nicolas okiokpa - avatar
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'
1st Jun 2020, 4:28 PM
Nicolas okiokpa
Nicolas okiokpa - avatar
0
Could it be happening because I'm using android?
1st Jun 2020, 4:30 PM
Nicolas okiokpa
Nicolas okiokpa - avatar
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]
1st Jun 2020, 4:35 PM
Nicolas okiokpa
Nicolas okiokpa - avatar
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 $
1st Jun 2020, 4:38 PM
Nicolas okiokpa
Nicolas okiokpa - avatar
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]
1st Jun 2020, 4:42 PM
Nicolas okiokpa
Nicolas okiokpa - avatar
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]
1st Jun 2020, 4:44 PM
Nicolas okiokpa
Nicolas okiokpa - avatar
0
Thanks amir5625
2nd Jun 2020, 12:27 PM
Nicolas okiokpa
Nicolas okiokpa - avatar
0
Nicolas okiokpa if you have solved then please tell again the whole process how you have solved in Android
24th Oct 2020, 3:51 AM
Gaurav Kumar
Gaurav Kumar - avatar