Hi,

I'm new to cx_freeze. I'm trying to get something that imports PyQt5
working with cx_freeze and python3 on linux (x86_64).

When I just run cx_freeze without any arguments on the binary, it is
missing many dependencies in the build. When I run it, it raises an import
error for PyQt5

So I added --include-modules=PyQt5

Now cx_freeze raises the import error. This first occurs near line 146 in
finder.py within cx_freeze. I added a code.interact() statement:

    def _FindModule(self, name, path, namespace):
        try:
            return imp.find_module(name, path)
        except ImportError as e:
            code.interact()
            print("Import error ",path,e)


When I type "import PyQt5" in the interactive console, it works without any
problems. However, the exception being raised by imp.find_module is "No
module named 'PyQt5'"

I don't understand why that's happening. The path looks right (includes the
site-packages directory that contains PyQt5).

Any ideas on how to proceed?

Thanks
Jack
------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
cx-freeze-users mailing list
cx-freeze-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cx-freeze-users

Reply via email to