0

My python3 script currently requires pypdf2 for execution. If I want to run it on another device I would have to install python3, pip and pypdf2.

Is there a way to include pypdf2 into my script so that I only need python itself to run my script?

EDIT: The script runs on windows (10)

Anh Tuan Nguyen
  • 429
  • 1
  • 6
  • 18
  • What is your target platform? A Windows system, Linux desktop/server? Is docker an option? – Rick Rongen Mar 27 '18 at 10:05
  • It's windows. I added it to the description – Anh Tuan Nguyen Mar 27 '18 at 10:12
  • Possible duplicate of [How to make a Python script standalone executable to run without ANY dependency?](https://stackoverflow.com/questions/5458048/how-to-make-a-python-script-standalone-executable-to-run-without-any-dependency) – phd Mar 27 '18 at 17:46

1 Answers1

1

If you want to distribute your script you can do this using PyInstaller as a stand-alone application.
This is a python module that bundles the interpreter with all the required libraries.

Rick Rongen
  • 719
  • 5
  • 10