thank so much! It sloved the problem. I think the reason for my previous script not working is because i try to import different package in one windows.
Thanks again for all of your help! Ning On Dec 9, 9:30 am, werner <[email protected]> wrote: > Ning wrote: > > Hello > > > I am new to python. I have got two version of SQLAlchemy, 0.4.0 and > > 5.5. > > > Some of my old script built in 0.4.0, and I do not want to change the > > script. > > > Is that any way I can define in the script to use SQLAlchemy 0.3.11 > > for my old script and 5.5 for my new script? > > I use this code: > if not hasattr(sys, 'frozen'): > import pkg_resources > pkg_resources.require("sqlalchemy") # get latest version > ## pkg_resources.require("sqlalchemy==0.4.3") # use a specific version > > Use the last line and set it to the version you want. I check for > "frozen" as a deploy with py2exe and this would not work for the > py2exe'd version. > > Werner -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
