ModuleNotFoundError: No module named 'insertpf'

ModuleNotFoundError: No module named ‘insertpf’
i cant’ creat exe file
compile it can’t run
main.py
sorry this is long long…
my first program
i need help
just exe run error
vscode in play is fine
i will try many Googling and pyinstaller re setup and spec file set hiding import and format virtual environment
main

That is a Python error that tells you the module insertpf isn’t available. Maybe you need to install it, or the name is misspelled?

When describing an error, try to always give full details, this is actually too short rather than too long. In the future it’s better to give the exact commands you used, the full error message, and a description of what you’re trying to achieve. Including a link to your code was good. :slightly_smiling_face:

sorry
i’m korean
i can’t many english
but you are helping is so so thank you

Thanks for adding the screenshot! I noticed that insertpf.py exists in your repository, too. Usually Python checks the same directory for modules.

How do you run the script? The screenshot doesn’t look like you use the command line.

one diretory
pp=insertp() #class name
and button command

It fails before that function call. Importing the insertpf module fails here:

Unfortunately I can’t see why, I assume it’s some problem with your IDE. Can you try calling your script on the command line, like this (in the repository directory)?

python main.py

When using the geany IDE, I have to set the “execute” command to be “python3”. The default is “python”, which means python2.

Could this be a similar problem? E.g. you might have installed insertpf using pip when you meant to use pip3 [or the other way around…]