0

I try to package my python script to executable :

from cx_Freeze import setup, Executable

build_exe_options = {"packages": ["sample.src.util.lib"]}

setup(
    name="Myprogram",
    version="0.1",
    options={"build_exe": build_exe_options},
    executables=[Executable("main.py")],
)

When I run python setup() build

Error :

ImportError: No module named 'sample.src.util.lib'

EDIT : Tree of my project

main.py
sample
   src
      util
          lib
              extract.py
              control.py
martin
  • 143
  • 1
  • 3
  • 9
  • Where is `sample.src.util.lib` physically located in relation to the present python script? – Sowmya Jun 18 '20 at 09:05
  • Have you checked this thread? https://stackoverflow.com/questions/338768/python-error-importerror-no-module-named?rq=1 – Sowmya Jun 18 '20 at 09:08

0 Answers0