1

I have written a Python scripts which uses some add on libraries like MatPlotLib, NumPy, DateUtil etc. How can I make this Python scripts as an installer or packages, something like jar files, so that my scripts will run on different systems without installing AddOn libraries individually? I am using windows OS also my scripts takes few command line arguments.

Any solutions, hints or links will make my life earier. Thanks in advance for your kind co-operation.

Anand
  • 823
  • 1
  • 10
  • 19
  • possible duplicate of [How to make a Python script standalone executable to run without ANY dependency?](http://stackoverflow.com/questions/5458048/how-to-make-a-python-script-standalone-executable-to-run-without-any-dependency) – aga Jan 08 '14 at 06:49

2 Answers2

0

You can create Java JAR files from Python scripts with Jython, but there is no NumPy Jython port for example.

Anyway, there are various tools to package your script into executable: cx_freeze, bbfreeze, PyInstaller, etc.

Norbert Sebők
  • 1,208
  • 8
  • 13
0

I have use py2exe with the below set up file:

  from distutils.core import setup
  import py2exe

  from distutils.filelist import findall
  import matplotlib

  setup(
        console=['PlotMemInfo.py'],

        options={
                 'py2exe': {
                            'packages' : ['matplotlib'],
            'dll_excludes': ['libgdk-win32-2.0-0.dll',
                            'libgobject-2.0-0.dll',
                            'libgdk_pixbuf-2.0-0.dll']
                           }
              },
        data_files = matplotlib.get_py2exe_datafiles()
      )
Anand
  • 823
  • 1
  • 10
  • 19