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