On 27/06/13 22:33, Boxuan Cui wrote:
I deleted my previous post. The app won't crash, but it did not work
as intended.
I took a closer look and found that modules like /pandas.io.sql/,
/rpy2.objects/, /pandas.rpy.common/ do not exist at all. As a result,
PyInstaller could not find them. However, if I do /import
pandas.io.sql as psql/, /import rpy2.objects as robjects/ and /import
pandas.rpy.common as com/, it works. Why is this so?
Don't forget that there may be a module/package pandas.io that contains
an object called sql or even one called pandas that contains an object
io that has a member called sql and just to add to the confusion there
can be some renaming/aliasing so for example the pandas.io package could
from pandas.os.whatever.sqlstuff import stuff as sql, etc. This sort of
thing is especailly common when a package author has to deal with
platform specific items. I have some in some of my code and pyinstaller
& py2exe both have trouble unless I explicitly tell them to include the
"real" package(s) or in cases where I am having to programmatically
generate imports I can twist their arm by having somewhere in my code
imports of all the possible results behind an if False: clause.
You should be able to get a clue by adding to your code, after the
imports, above:
print psql.__file__
print robjects.__file__
etc.
<snip>
Gadget/Steve
--
You received this message because you are subscribed to the Google Groups
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/groups/opt_out.