Is there a way to embed dependencies within a python script?

后端 未结 3 746
失恋的感觉
失恋的感觉 2020-12-24 07:10

I have a simple script that has a dependency on dnspython for parsing zone files. I would like to distribute this script as a single .py that users can run just so long as

3条回答
  •  我在风中等你
    2020-12-24 07:36

    The simplest way is just to put your python script named __main__.py with pure Python dependencies in a zip archive, example.

    Otherwise PyInstaller could be used to produce a stand-alone executable.

提交回复
热议问题