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

Thorsten Kampe thorsten at thorstenkampe.de
Sat Jan 17 14:50:10 GMT 2009


* Doug Hackworth (Fri, 16 Jan 2009 14:44:57 -0600)
> > ...Regarding that, doesn't "import" try to find .py files?

Yes, but not exclusively (also pyc, pyo, pyd, and __init__.
 
> 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?

Yes. 

> > 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.

Normally not. I have it like this for years and there has never been any 
problem. But in your case it looks you're starting Windows Python which 
tries to find Cygwin Python modules.

PyQt4 (the one you installed) will only run with Windows Python. If you 
start Windows Python and it really shows you this path then something is 
completely wrong and you should start all over again by completely 
uninstalling Windows and Cygwin Python, additionally deleting all 
Variables like PYTHONHOME, HOME, PYTHONSTART, etc. that are not default.

Thorsten



More information about the PyQt mailing list