久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

如何使我的 python 腳本易于移植?或者如何編譯成

How to make my python script easy portable? or how to compile into binary with all module dependencies?(如何使我的 python 腳本易于移植?或者如何編譯成具有所有模塊依賴項的二進制文件?) - IT屋-程序員軟件開發
本文介紹了如何使我的 python 腳本易于移植?或者如何編譯成具有所有模塊依賴項的二進制文件?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

有沒有辦法將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:

  • PyInstaller:http://www.pyinstaller.org/ [Windows、Linux、OS X]
  • cx_freeze:http://cx-freeze.sourceforge.net/ [Windows, Linux]
  • py2exe:http://www.py2exe.org/ [Windows]
  • py2app:http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html [os x]
  • PyInstaller: http://www.pyinstaller.org/ [Windows, Linux, OS X]
  • cx_freeze: http://cx-freeze.sourceforge.net/ [Windows, Linux]
  • py2exe: http://www.py2exe.org/ [Windows]
  • py2app: http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html [os x]

但如前所述,您也可以使用 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模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

How to draw a rectangle around a region of interest in python(如何在python中的感興趣區域周圍繪制一個矩形)
How can I detect and track people using OpenCV?(如何使用 OpenCV 檢測和跟蹤人員?)
How to apply threshold within multiple rectangular bounding boxes in an image?(如何在圖像的多個矩形邊界框中應用閾值?)
How can I download a specific part of Coco Dataset?(如何下載 Coco Dataset 的特定部分?)
Detect image orientation angle based on text direction(根據文本方向檢測圖像方向角度)
Detect centre and angle of rectangles in an image using Opencv(使用 Opencv 檢測圖像中矩形的中心和角度)
主站蜘蛛池模板: 日本精a在线观看 | 日韩成人免费av | 亚洲精品成人 | 狠狠久久综合 | 欧美在线一二三 | 日本偷偷操 | 国产日韩欧美在线播放 | 国产原创视频 | 国产91在线观看 | 成人免费在线视频 | 亚洲va国产日韩欧美精品色婷婷 | 欧美成人一区二区三区 | 精品久久精品 | 亚洲欧美日韩中文字幕一区二区三区 | 日韩1区2区 | 国产色视频网站 | 日本又色又爽又黄又高潮 | 一区二区亚洲 | 521av网站 | 黄色在线观看国产 | 欧美日韩在线一区二区 | 欧美日韩在线一区二区 | 亚洲 中文 欧美 日韩 在线观看 | 亚洲午夜av | www.色五月.com| 午夜激情免费视频 | 亚洲一区二区av | 99pao成人国产永久免费视频 | 日本中文字幕视频 | 国内精品久久久久久 | 丝袜 亚洲 另类 欧美 综合 | 日本免费网 | 国产精品久久久久久久久久久久 | 视频一区二区在线观看 | 国产一区久久 | 免费国产网站 | 亚洲国产成人在线观看 | 日韩性在线 | 激情一区二区三区 | 国产美女精品视频 | 成人精品视频在线 |