0

I have a Python program that requires the install of 4 external libraries. This program needs to be given to other people to run who may not have any command line experience so giving them commands to enter is not really an option.

Is there a way I can package all these libraries into one file so they can execute easier without the need to do several installs?

I have researched and experimented with distutils, setuptools and python eggs but could not get the file running on another machine.

Andy Feely
  • 245
  • 1
  • 2
  • 10
  • 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) – tzaman Jul 29 '15 at 13:45
  • What platform will the other people be running it on? There's PyInstaller, Py2Exe, and various other options. – tzaman Jul 29 '15 at 13:45
  • I did research py2exe, but it has to be able to run on a linux machine as well – Andy Feely Jul 29 '15 at 13:46
  • Are you sure all 4 external libs are python-only? If not, you'll have to distribute multiple versions of the libs. – Brian McFarland Jul 29 '15 at 13:52
  • Yes, all the libs are python only – Andy Feely Jul 29 '15 at 13:54

1 Answers1

0

If you are using files on pypi.python.org (PyPI)

import pip
for x in ['list', 'of', 'packages']:
    pip.main(['install', x)

['list', 'of', 'packages'] being a list of packages to be installed.

If you not are using PyPI, than there is no relevant way of installing a module

Dylan
  • 31
  • 3