Creating exe using py2exe + sqlalchemy + mssql

I have a problem using exe using py2exe. In my project, I am using sqlalchemy with the mssql module. My setup.py script looks like this:

from distutils.core import setup
import py2exe


setup(
  windows=[{"script" : "pyrmsutil.py"}],
  options={"pyrmsutil" : {
    "includes": ["sqlalchemy.dialects.mssql", "sqlalchemy"],
    "packages": ["sqlalchemy.databases.mssql", "sqlalchemy.cresultproxy"]
}})

But when I start a procedure like: python.exe setup.py py2exe

I get a build log with the following errors: The following modules are missing ['_scproxy', 'pkg_resources', 'sqlalchemy.cprocessors', 'sqlalchemy.cresultproxy']

And in the "dist" folder, I see the pyrmsutil.exe file, but when I run it, nothing happens. I mean, the executable starts up, but does nothing and ends immediately without any pyrmsutil.exe.log file. It is very strange.

Can someone help me with this error?

+3
2

, py2exe sqlalchemy c.

, sqlachemy py2exe ?

script:

import sys
import path
import pkg_resources

APP_HOME = path.path(sys.executable).parent
SUPPORT = APP_HOME / 'support'

eggs = [egg for egg in SUPPORT.files('*.egg')]
reqs, errs = pkg_resources.working_set.find_plugins(
    pkg_resources.Environment(eggs)
)
map(pkg_resources.working_set.add, reqs)

sys.path.extend(SUPPORT.files('*.egg'))

(http://pypi.python.org/pypi/path.py), , .

0

, , pyInstaller? py2exe - . pyInstaller , , .

DLL exe .

+1

All Articles