Hi guys,

converting .ui to .py to .exe

using Qt Designer (PyQt4), Python 2.7, and py2exe

Ive been able to do this with Tkinter gui's but having problems with gui's from Qt Designer?

First error was due to missing msvcp90.dll which ive downloaded and copied into the python dll directory, and i no longer get that error... but now i am getting other errors and i do not know what to do about them?

Here is some printout from my command prompt (not python code, but i'm sure most of you know this :)

this is from the end of the conversion process from .ui to .exe

*** copy extensions ***
*** copy dlls ***
copying C:\Python27\lib\site-packages\py2exe\run.exe -> C:\smstextdriver\dist\SM

*** binary dependencies ***
Your executable(s) also depend on these dlls which are not included,
you may or may not need to distribute them.

Make sure you have the license if you distribute any of them, and
make sure you don't distribute files belonging to the operating system.

   USER32.dll - C:\Windows\system32\USER32.dll
   IMM32.dll - C:\Windows\system32\IMM32.dll
   SHELL32.dll - C:\Windows\system32\SHELL32.dll
   ole32.dll - C:\Windows\system32\ole32.dll
   WINMM.dll - C:\Windows\system32\WINMM.dll
   COMDLG32.dll - C:\Windows\system32\COMDLG32.dll
   ADVAPI32.dll - C:\Windows\system32\ADVAPI32.dll
   WS2_32.dll - C:\Windows\system32\WS2_32.dll
   WINSPOOL.DRV - C:\Windows\system32\WINSPOOL.DRV
   GDI32.dll - C:\Windows\system32\GDI32.dll
   MSVCP90.dll - C:\Python27\DLLs\MSVCP90.dll
   KERNEL32.dll - C:\Windows\system32\KERNEL32.dll

From about 16 lines from the bottom of the printout above:

*** binary dependencies ***
Your executable(s) also depend on these dlls which are not included,
you may or may not need to distribute them.

Does this mean I need to download and install all the dll's listed there and copy into my python dll directory?

And when i try to run the new EXE i get the following error:

Traceback (most recent call last):
  File "SMStextdriver.py", line 10, in <module>
  File "PyQt4\QtCore.pyc", line 12, in <module>
  File "PyQt4\QtCore.pyc", line 10, in __load
ImportError: No module named sip

Im thinking that the last line there "ImportError: No module named sip"... is a problem! (duh) but where the heck is that dang module! Where do i get it and where should i put it? And is that my only problem here? (only code problem... lol... i know my biggest problem is that I have no idea what's going on! ;)

thanks in advance guys, you rock!

Additional information, i am using windows 7 32 bit

well, ive just stumbled across this! its amazing how much you google, with nil, and then after a forum post, you seem to get google results of what you need!


i havent tested it out yet, but ill get back and let you guys know.. .plus this doesnt answer all my problems.

Brilliant, by typing:

"python setup.py py2exe --includes sip" at the command prompt in setup.py directory, it worked!!!!

Im still wondering if there are going to be any problems because of the other "dll" comments above?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.