<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # 編譯 PyQt 到 EXE > 原文: [https://pythonbasics.org/Compile-PyQt-to-exe/](https://pythonbasics.org/Compile-PyQt-to-exe/) 要分發您的應用程序,您需要有一個可執行程序而不是源代碼。 這比給用戶提供許多 Python 文件要容易。 為什么? 用戶只需單擊一下即可啟動您的應用程序。 在 Windows 上,它是`.exe`。 在 Mac OS X 上,它是`.dmg` ## 構建 EXE ### 安裝工具鏈 您可以使用`fbs`創建可以運行的程序。 ```py sudo apt3 install python3-venv python3 -m venv venv source bin/activate pip3 install fbs PyQt5==5.9.2 PyInstaller==3.4 fbs startproject ``` 然后,系統會要求您輸入應用程序的名稱和作者 ```py App name [MyApp] : hello Author [Linux] : boss Mac bundle identifier (eg. com.boss.hello, optional): Created the src/ directory. ``` 看一下文件`/venv/src/main/python/main.py`。 這就是您的程序的源代碼。 鍵入`fbs run`啟動程序。 ![python pyqt to exe](https://img.kancloud.cn/99/23/992362accee41d69ca4f2ddf5529527c_380x281.jpg) ### 創建可執行文件 您從二進制文件啟動應用程序。 在 Windows 上是`.exe`,在 Mac 上是`.dmg` 制作獨立的可執行文件類型 `fbs freeze`。 然后在`target/`中創建程序。 如果您將應用命名為`hello`,則為`target/hello/hello`。 ### 設置 始終使用安裝程序來安裝軟件。 您可以使用命令`fbs installer`創建自己的安裝程序。 在 Windows 和 Mac 上,這將創建一個圖形安裝程序(安裝向導)。 在 Linux 上,它會創建一個軟件包文件(`.deb`,`.rpm`),可以與軟件包管理器一起安裝。 [下載示例](https://gum.co/pysqtsamples)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看