Gather all Python modules used into one folder?

后端 未结 3 459
花落未央
花落未央 2021-01-12 04:58

I don\'t think this has been asked before-I have a folder that has lots of different .py files. The script I\'ve made only uses some-but some call others & I don\'t kno

3条回答
  •  花落未央
    2021-01-12 05:29

    Freeze does pretty close to what you describe. It does an extra step of generating C files to create a stand-alone executable, but you could use the log output it produces to get the list of modules your script uses. From there it's a simple matter to copy them all into a directory to be zipped up (or whatever).

提交回复
热议问题