Modern Sunrise
Modern Sunrise

Reputation: 3

Pyinstaller Error: ModuleNotFoundError: No module name 'playsound'

I'm running pyinstaller from cmd to create an exe from a script I wrote in a Pycharm Venv.

I'm using the line:

pyinstaller--onefile main.py

When trying to run my exe I get this error:

    File "main.py, line 2, in <module>
        from playsound import playsound
    ModuleNotFoundError: No module named 'playsound'
    [5624] Failed to execute main

Things I've tried:

Upvotes: 0

Views: 3189

Answers (2)

Mysterious K
Mysterious K

Reputation: 79

You dont have playsound installed I believe, or you have it installed in the wrong env. Try running this in your terminal: pip3 install playsound If you dont have pip installed, this: sudo apt install python3-pip ; pip3 install playsound

Upvotes: 0

Owen Valentinus
Owen Valentinus

Reputation: 394

Have you installed it with pip? pip install playsound

Upvotes: 0

Related Questions