有没有办法将python脚本编译成二进制?我有一个文件 python 脚本,它使用了很多模块.我想要的是在其他机器(freebsd)上拥有它的副本,但无需在每台主机上安装所有需要的模块.
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 (freebsd) but without installing all needed modules on every host.
在这种情况下有什么可能的解决方案?
What are possible solutions in such cases?
可以做你要求的程序有:
Programs that can do what you ask for are:
但如前所述,您也可以使用 Distribute 创建一个包,并将其他包作为依赖项.然后你可以使用 pip 来安装那个包,它会安装所有的包.不过,您仍然需要安装 Python 和 pip.
But as mentioned you can also create a Package with Distribute and have the other packages as dependencies. You can then uses pip to install that package, and it will install all of the packages. You still need to install Python and pip, though.
这篇关于如何使我的 python 脚本易于移植?或者如何编译成具有所有模块依赖项的二进制文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
如何在python中的感兴趣区域周围绘制一个矩形How to draw a rectangle around a region of interest in python(如何在python中的感兴趣区域周围绘制一个矩形)
如何使用 OpenCV 检测和跟踪人员?How can I detect and track people using OpenCV?(如何使用 OpenCV 检测和跟踪人员?)
如何在图像的多个矩形边界框中应用阈值?How to apply threshold within multiple rectangular bounding boxes in an image?(如何在图像的多个矩形边界框中应用阈值?)
如何下载 Coco Dataset 的特定部分?How can I download a specific part of Coco Dataset?(如何下载 Coco Dataset 的特定部分?)
根据文本方向检测图像方向角度Detect image orientation angle based on text direction(根据文本方向检测图像方向角度)
使用 Opencv 检测图像中矩形的中心和角度Detect centre and angle of rectangles in an image using Opencv(使用 Opencv 检测图像中矩形的中心和角度)