0

I am trying to convert a .py file to .exe using pyinstaller. When I try to run the executable the following error is shown : error

My current pyinstaller command is the following:

pyinstaller --noconfirm --onefile --console  --hidden-import "pydub" --add-data "C:/Users/me/AppData/Local/Programs/Python/Python37/Lib/site-packages/customtkinter;customtkinter/"  "C:/Users/me/PycharmProjects/TestProj/main.py"
Ventior
  • 207
  • 1
  • 10

2 Answers2

0

Try installing it with pip .

pip3 install pydub

Maybe you have multiple python versions

pwopow
  • 11
  • 3
0

As I already pip installed pydub and added pydub to the hidden imports I tried to delete every file in my Virtual Environment that I didn't need. Deleting all Pycharm related files and deleting the old build/dist folder alongside the .spec file seems to have fixed the problem.

Ventior
  • 207
  • 1
  • 10