[PyQt] Re: Re: Deploying from Linux to Windows

Doug Hackworth doug.hackworth at vanderbilt.edu
Fri Jan 16 20:44:57 GMT 2009


> Nevertheless at least setting PYTHONPATH to the site-packages directory 
> is an excellent idea for troubleshooting.

So I set PYTHONPATH to C:\Python26\Lib\site-packages , rebooted, and tried again 
to run the application.  Same result:  It claims that there is no PyQt4 module.


> Is it only this way for PyQt or for other modules in site-packages? 

Everything, I think.  Actually after adding the PYTHONPATH as above, now it 
won't even import PyQt4 first, nor the other things (like "adodbapi") that I see 
in site-packages.  ...Regarding that, doesn't "import" try to find .py files? 
There is no Lib/site-packages/PyQt4.py , so is that a problem?  The path 
Lib/site-packages/PyQt4 that got installed is a directory, and inside it is a 
collection of DLL's and the like -- which I assume is right.  But is the lack of 
a .py file in site-packages normal?


> Print sys.path after importing sys. (Would be good to know before but 
> that's not possible).

Here we go:

 >>> import sys
 >>> print sys.path
['', '/cygdrive/c/Documents and Settings/BMLUser/Desktop/C', '/cygdrive/c/Docume
nts and Settings/BMLUser/Desktop/\\Python26\\Lib\\site-packages', '/usr/lib/pyth
on25.zip', '/usr/lib/python2.5', '/usr/lib/python2.5/plat-cygwin', '/usr/lib/pyt
hon2.5/lib-tk', '/usr/lib/python2.5/lib-dynload', '/usr/lib/python2.5/site-packa
ges']

Which now makes me think...  This Windows user has a Cygwin installation with 
Python inside of it.  Is it possible that creates a conflict for where to find 
packages/modules?  I'd never have thought so, but maybe it does.


More information about the PyQt mailing list