0

Is there a way to distribute a python library with an application, so that it can be run with out any installation? The app is primarily going to be used in a computer lab, where users do not have permission to install global libraries. Ideally, users would simply be able to unzip a folder and run the app. The following can be assumed:

  • The python interpreter is present
  • Linux operating system

The specific library I need is matplotlib, but I would like to find a generic solution. I've looked at programs like PyInstaller, but they create very large programs that are slow to start. They also include a python interpreter, which is unnecessary.

charliehorse55
  • 1,940
  • 5
  • 24
  • 38

1 Answers1

2

Firstly, p2exe is Windows only.

In principle you can put all of you libraries into the ZIP file so they get expanded in place with thie application. At most you may need to adjust the PYTHONPATH variable to point at the lib's location.

There is no technical difference between modules installed on the path and in the system's python installation.

Have you looked at cxfreeze?

Ber
  • 40,356
  • 16
  • 72
  • 88