How can I send a Python program (including libraries) to a friend?
Question: I want to send a program that I made to my friend, but the problem is it's not
going to work on his computer, because he doesn't have all the libraries
installed. For example :

    
    
    #! /usr/bin/env python2.7
    
    from PyQt4.QtCore import *
    from PyQt4.QtGui import *
    from PyQt4.QtWebKit import *
    from bs4 import BeautifulSoup as bs
    import sys
    

how can I send him all necessary libraries? hope my question is clear.


Answer: You could also try "Python to EXE":

    
    
    http://www.py2exe.org/
    

This packs up a script & it components into an package that runs with an
included exe.

If you are brave, you can "roll your own", gathering up the key DLL's and EXE
for python:

    
    
    .\MSVCR71.dll
    .\OCI.dll
    .\python.exe
    .\python25.dll
    

And all the needed *.pyc & *.pyd files in Python HOME's Lib directory:

    
    
    .\Lib\cx_Oracle.pyc
    .\Lib\cx_Oracle.pyd
    .\Lib\encodings\aliases.pyc
    .\Lib\glob.pyc
    .\Lib\logging\config.pyc
    .\Lib\os.pyc
    .\Lib\pprint.pyc
    ... excreta ...
    

Taking all the files and any of your developed *.py scripts and rolling them
up into an appropriate directory structure and zipping it up for distribution.

