Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7975015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:32:01+00:00 2026-06-04T08:32:01+00:00

I have written a simple web application with embedded web server (tornado), database (sqlalchemy

  • 0

I have written a simple web application with embedded web server (tornado), database (sqlalchemy using sqlite for now), and the whole shabang. I would like to bundle it all up into a single self-contained directory with a single exe that can be run. The deployment scenario absolutely demands a one click install and run like this.

I have absolutely failed trying to get py2exe or pyinstaller to bundle up my code. The problem has directly to do with the directory structure and layout, which is as follows. I do not want to change the directory layout to much. Can someone suggest how I can get this with either py2exe or pyinstaller or any other suitable tool?

project/
|-> main.py

|-> libs/
    |-> tornado/ (The full git rep as a submodule)
        |-> tornado/ (The actual package)
    |-> sqlalchemy/

|-> src/
    |-> support-1.py
    |-> support-2.py

|-> static/
    -> js/
    -> img/
    -> css/

|-> templates/
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T08:32:02+00:00Added an answer on June 4, 2026 at 8:32 am

    Well, sorry to answer my own question. But much googling and trial and error, I managed to get this working. I am pasting my setup.py (for py2exe) below for anyone who has similar issues getting tornado + sqlalchemy + sqlite working with py2exe. When I run python setup.py py2exe, the last lines mention that some module are missing. But this had no impact on the execution of the program.

    > "['Carbon', 'Carbon.Files', '_curses', '_scproxy', 'django.utils',
    > 'dummy.Process', 'pkg_resources', 'pysqlite2', 'simplejson',
    > 'sqlalchemy.cprocessors', 'sqlalchemy.cresultproxy', 'tornado.epoll']"
    

    Here is my setup.py:

    import glob, os, sys
    
    curr_dir = os.path.abspath('.')
    pare_dir = os.path.abspath('..')
    
    sys.path = [os.path.join(pare_dir, 'py2exe-0.6.9', 'py2exe'),
               os.path.join(curr_dir, 'src'),
               os.path.join(curr_dir, 'libs', 'tornado'),
               os.path.join(curr_dir, 'libs', 'sqlalchemy'),
               os.path.join(curr_dir, 'libs')] + sys.path
    
    
    from distutils.core import setup
    import py2exe
    
    data_files = [('', ['config.json']),
                  ('db', ['db/prs.db']),
                  ('templates',      glob.glob('templates/*.*')),
                  ('static',         glob.glob('static/*.*  ')),
                  ('static/css',     glob.glob('static/css/*.*')),
                  ('static/js',      glob.glob('static/js/*.*')),
                  ('static/js/libs', glob.glob('static/js/libs/*.*')),
                  ('static/img',     glob.glob('static/img/*.*')),
                  ]
    
    setup(console=['prs.py'], options={
        'py2exe' : {
            'includes' : ['demjson'],
            'packages' : ['sqlalchemy.dialects.sqlite'],
            }},
        data_files=data_files,
        )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've written a simple web application using asp.net mvc3 and I have a login
Using Netbeans 6.8 and metro 2.0 I have written a simple application that makes
I have a fairly simple data audit web application written with ASP MVC which
I have written a small custom web server application in C running on Linux.
I have my web application written in Spring MVC. It is quite simple app
I currently have a very simple web application written in Django, and I would
I have a simple web application written in java which has servlets accessing the
I have written a simple ASP.NET MVC 2 application that stores data and can
I have a web-application written on ASP.NET MVC 3. On client side I used
I have inherited a poorly written web application that seems to have errors when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.