Search code examples
pythonmodulepyinstallerexe

need help using pyinstaller


i am trying to program a simple script and i would like to know if anyone has the answer to this question

when i have a module for example WMI from 'pip install wmi' in the form as 'import wmi' in my code, how do i get the pyinstaller module to compile the wmi module with the exe file

i have tried importing from the source code in a folder example 'from wmi import wmi' but i got no luck when launching the exe file only in the raw python file, also just to note when i compile the script i do the command 'pyinstaller vb.py --onefile'


Solution

  • remove --onefile since wmi couns as a file (or multiple if its a package)