简体   繁体   English

如何制作可启动的USB以运行Python脚本

[英]How to make a bootable USB to run a Python script

I'm not trying to make a script that creates a bootable USB. 不是要创建可启动USB的脚本。 I'm making a password recovery program. 我正在制作一个密码恢复程序。

Now what I would like to do is have a bootable USB that would, once booted, run a python script. 现在,我想做的是拥有一个可启动的USB,该USB一旦启动,便会运行python脚本。

It's simple as that (or is it?). 就这么简单(或者是吗?)。 I didn't try anything yet because I don't know how to do it and I didn't find much about this. 我尚未尝试任何操作,因为我不知道该怎么做,对此我也没找到太多。

I was thinking of using some minimal linux distro (Such as Damn Small Linux, ~50mb), install python and run the script. 我当时在考虑使用一些最小的Linux发行版(例如Damn Small Linux,〜50mb),安装python并运行脚本。

Anyone knows something about this? 有人知道吗? Any help would be appreciated. 任何帮助,将不胜感激。

EDIT: Forgot to mention: Windows 10 Pro Python 3.4 (Anaconda3 distribution) 编辑:忘记提及:Windows 10 Pro Python 3.4(Anaconda3发行版)

I would suggest looking at cx_freeze to bundle your python script with all its dependencies to include with the USB OS. 我建议查看cx_freeze以将您的python脚本及其所有依赖项捆绑在一起,以包含在USB OS中。 This might help with the configuration. 这可能有助于配置。 You should be able to install the OS on the USB and then just copy over the cx_freeze directory and not have to worry about installing modules on the base OS 您应该能够将操作系统安装在USB上,然后只需复制cx_freeze目录,而不必担心在基本操作系统上安装模块

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM