How to make my python script easy portable? or how to compile into binary with all module dependencies?

后端 未结 4 1738
谎友^
谎友^ 2020-12-24 15:32

Is there any way to compile python script into binary? I have one file python script which uses a lot of modules. What I would like is to have its copy on other machines (fr

4条回答
  •  被撕碎了的回忆
    2020-12-24 16:19

    You probably want to create a Python package from your script. In the end you will be able to do pip install mypackage on any host and all the required modules will be downloaded and installed automatically.

    See this question on how to create such a package.

提交回复
热议问题