tcrbianchidave

Python: Compile, Executable, Bundled file

Discussion created by tcrbianchidave on Feb 14, 2014
Latest reply on Feb 14, 2014 by lpinner
Hello everyone,

I am new to the forum, I am using python software of which I have never used before up until recently.

I am having issues with Compiling my python programme scripts into a singular executable file that I can operate and use.

Data Logging Application.

I am using:

Python 2.7.6
Matplotlib 1.2
Pywin32 Build 218
Numpy MKL 1.7.1
Py2exe

& other numerous associated files.


[U]I am using:
Pyinstaller
To compile the programme into an executable or bundled file.

Does anyone know how to use 'Pyinstaller' to compile the above associated programmes as the manuals are not clear as to how to   do this and there is little or no technical support exists or is available.

My setup file is:

##########################
##########################
from distutils.core import setup
import py2exe
import glob


from distutils.filelist import findall
import os
import matplotlib
import matplotlib.pyplot as plt
from matplotlib import rcsetup
#####
## ##              
               
opts = {



'py2exe'
            : { "includes" :

              [  "sip","pyQy4._qt","matplotlib.backends","matplotlib.backends.backend_qt4agg",
                 "matplotlib.figure","matplotlib.pylab","matplotlib.numerix.fft",
                 "matplotlib.numerix.linear_algebra", "matplotlib.numerix.random_array", 
                 "matplotlib.backends.backend_tkagg"],
           
               "excludes" :
                
               [  '_gtkagg', '_agg2', '_cairo', '_cocoaagg', '_fltkagg', '_gtk', '_gtkcairo', ],
                  'dll_excludes' : ['libgdk-win32-2.0-0.dll', 'libgobject-2.0-0.dll'] }}

data_files = [
               (r'mpl-data',glob.glob(r'C:\python27\Lib\site-packages\matplotlib\mpl-data\*,*')),
               (r'mpl-data',[r'C:\python27\Lib\site-packages\matplotlib\mpl-data\matplotlibrc']),
               (r'mpl-data\images',glob.glob(r'C:\python27\site-packages\matplotlib\mpl-data\images\*.*')),
               (r'mpl-data\fonts',glob.glob(r'C:python27\Lib\site-packages\matplotlib\mpl-data\fonts\*.*')) ]

setup(windows = [{"script" : r'Prg_Mn_1_0.py'}], options=opts, data_files=data_files)

setup(console=['main.py'])


When Pyinstaller is initially run it creates a ???myScript.spec??? file.
??? It does not say where to run Pyinstaller from to create this file  ?
??? As to where to find the ???myScript.spec??? when it is created  ?

Options:
Python/Pyinstaller Dos Window:                 Tried (I would assume via this method but how?)
Python Window:                                        Tried
Pipwin:                                                     Tried (N/A for install only)
Direct from Pyinstaller files:                        Tried
Inserting files:                                           Tried

None worked, numerous & various combinations performed separately.

Pyinstaller to run the ???Script??? File to compile (Bundling to one file) into an redistributable executable.
??? It does not say where to do this?

??? Is an additional script file required in addition to the all the python programmes/scripts for the Data logger ?
Such is specified nowhere one would assume ??? ???no???.


Thanks


Lloyd.

Outcomes