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

      <bdo id='uhUN8'></bdo><ul id='uhUN8'></ul>

    <small id='uhUN8'></small><noframes id='uhUN8'>

  • <legend id='uhUN8'><style id='uhUN8'><dir id='uhUN8'><q id='uhUN8'></q></dir></style></legend>
  • <tfoot id='uhUN8'></tfoot>

    1. <i id='uhUN8'><tr id='uhUN8'><dt id='uhUN8'><q id='uhUN8'><span id='uhUN8'><b id='uhUN8'><form id='uhUN8'><ins id='uhUN8'></ins><ul id='uhUN8'></ul><sub id='uhUN8'></sub></form><legend id='uhUN8'></legend><bdo id='uhUN8'><pre id='uhUN8'><center id='uhUN8'></center></pre></bdo></b><th id='uhUN8'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='uhUN8'><tfoot id='uhUN8'></tfoot><dl id='uhUN8'><fieldset id='uhUN8'></fieldset></dl></div>
      1. 在 Windows 10 上使用 Nuitka 將 Python 3.6 腳本編譯為獨(dú)

        Compile Python 3.6 script to standalone exe with Nuitka on Windows 10(在 Windows 10 上使用 Nuitka 將 Python 3.6 腳本編譯為獨(dú)立 exe)

        <small id='iDUzF'></small><noframes id='iDUzF'>

          <bdo id='iDUzF'></bdo><ul id='iDUzF'></ul>

                <i id='iDUzF'><tr id='iDUzF'><dt id='iDUzF'><q id='iDUzF'><span id='iDUzF'><b id='iDUzF'><form id='iDUzF'><ins id='iDUzF'></ins><ul id='iDUzF'></ul><sub id='iDUzF'></sub></form><legend id='iDUzF'></legend><bdo id='iDUzF'><pre id='iDUzF'><center id='iDUzF'></center></pre></bdo></b><th id='iDUzF'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='iDUzF'><tfoot id='iDUzF'></tfoot><dl id='iDUzF'><fieldset id='iDUzF'></fieldset></dl></div>

                <tfoot id='iDUzF'></tfoot><legend id='iDUzF'><style id='iDUzF'><dir id='iDUzF'><q id='iDUzF'></q></dir></style></legend>
                  <tbody id='iDUzF'></tbody>

                • 本文介紹了在 Windows 10 上使用 Nuitka 將 Python 3.6 腳本編譯為獨(dú)立 exe的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  注意:
                  在將此問(wèn)題標(biāo)記為重復(fù)之前,請(qǐng)驗(yàn)證其他問(wèn)題是否回答了此設(shè)置的主題:

                  Note:
                  Before marking this question as duplicate, please verify that the other question answers the topic for this setup:

                  • 操作系統(tǒng):Windows 10,64 位
                  • Python 版本:3.6 或更高版本
                  • Python 編譯器:Nuitka,開(kāi)發(fā)版本 0.5.30rc5
                  • MSVC 編譯器:Visual Studio 2017 社區(qū),vcvars64.bat

                   

                  我將首先解釋如何構(gòu)建我的可執(zhí)行文件.假設(shè)我有一個(gè)文件夾,里面有一個(gè)我想要構(gòu)建的簡(jiǎn)單 python 腳本:

                  I'll first explain how I build my executable. Suppose I have a folder with a simple python script that I want to build:

                  buildscript.py 看起來(lái)像這樣:

                  #####################################################
                  #               NUITKA BUILD SCRIPT                 #
                  #####################################################
                  # Author: Matic Kukovec
                  # Date: April 2018
                  
                  import os
                  import platform
                  
                  
                  NUITKA = "C:/Python36/Scripts/nuitka3-script.py"  # Path where my nuitka3-script.py is
                  CWD = os.getcwd().replace("\", "/")
                  MSVC = "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/Build/vcvars64.bat"
                  PYTHON_VERSION = "3.6"
                  PYTHON_EXE_PATH= "C:/Python36/python.exe"
                  NUMBER_OF_CORES_FOR_COMPILATION = 1 # 1 is the safest choice, but you can try more
                  
                  # Generate command
                  command = '"{}" amd64 &'.format(MSVC)
                  command += "{} ".format(PYTHON_EXE_PATH)
                  command += "{} ".format(NUITKA)
                  command += "--python-version={} ".format(PYTHON_VERSION)
                  command += "--output-dir={}/output ".format(CWD)
                  command += "--verbose "
                  command += "--jobs={} ".format(NUMBER_OF_CORES_FOR_COMPILATION)
                  command += "--show-scons "
                  # command += "--windows-disable-console "
                  # command += "--icon={}/myicon.ico ".format(CWD)
                  command += "--standalone "
                  # command += "--run "
                  command += "{}/cubeimporter.py ".format(CWD)
                  os.system(command)
                  
                  print("END")
                  

                   

                  構(gòu)建完成后,文件夾如下所示(見(jiàn)下圖).如您所見(jiàn),可執(zhí)行文件旁邊還有許多其他文件.我可以看到 .dll.pyd 文件.

                  After the build finishes, the folder looks like this (see picture below). As you can see, there are plenty of other files sitting next to the executable. I can see .dll and .pyd files.

                   

                  我希望我可以只構(gòu)建一個(gè)獨(dú)立的可執(zhí)行文件.不需要 dll 或其他文件.當(dāng)我將可執(zhí)行文件放在拇指驅(qū)動(dòng)器上并將其粘貼到另一臺(tái)計(jì)算機(jī)(運(yùn)行 Windows 10、64 位)時(shí),它應(yīng)該可以正常工作.即使那臺(tái)計(jì)算機(jī)上沒(méi)有安裝 Python.

                  I wish I could build just a standalone executable. No dll- or other files needed. When I put the executable on a thumb drive and stick it into another computer (running Windows 10, 64-bit), it should just work. Even if there is no Python installed on that computer.

                  Nuitka 可以做到這一點(diǎn)嗎?
                  如果不是,是否可以使用另一個(gè) Python 編譯器?
                  請(qǐng)一一提供所有需要的步驟:-)

                  Is this possible with Nuitka?
                  If no, is it possible with another Python compiler?
                  Please provide all the steps needed, one-by-one :-)

                  推薦答案

                  單個(gè)可執(zhí)行文件比 Nuitka 更容易,例如PyInstaller:pyinstaller --onefile program.py(要禁用 GUI 應(yīng)用程序的控制臺(tái)窗口,請(qǐng)?zhí)砑?-w 選項(xiàng).

                  Easier than Nuitka for a single executable is e.g. PyInstaller: pyinstaller --onefile program.py (to disable the console window for GUI applications add the -w option).

                  要使用 Nuitka 創(chuàng)建單個(gè)可執(zhí)行文件,您可以從生成的文件創(chuàng)建 SFX 存檔.您可以使用生成 program_dist 目錄的 --standalone 選項(xiàng)運(yùn)行 Nuitka.

                  To create a single executable with Nuitka, you can create a SFX archive from the generated files. You can run Nuitka with the --standalone option which generates a program_dist directory.

                  然后創(chuàng)建一個(gè) 7-Zip SFX 配置文件 config.txt:<代碼>;!@Install@!UTF-8!GUIMode="2"ExecuteFile="%%T/program_dist/program.exe";!@InstallEnd@!

                  Create then a 7-Zip SFX config file config.txt: ;!@Install@!UTF-8! GUIMode="2" ExecuteFile="%%T/program_dist/program.exe" ;!@InstallEnd@!

                  然后從 https://github.com/chrislake/7zsfxmm 獲取 7-Zip SFX (從版本 - 7zsd_extra_171_3901.7z)并解壓 7zsd_All_x64.sfx 文件.

                  Then get the 7-Zip SFX from https://github.com/chrislake/7zsfxmm (from releases – 7zsd_extra_171_3901.7z) and unpack the 7zsd_All_x64.sfx file.

                  然后將 program_dist 與 7-Zip(因此該文件夾包含在存檔中)打包到 program.7z.然后,可以使用 copy/b 7zsd_All_x64.sfx + config.txt + program.7z single_executable.exe 創(chuàng)建 SFX.

                  Pack then the program_dist with 7-Zip (so the folder is included in the archive) to program.7z. Then, an SFX can be created with copy /b 7zsd_All_x64.sfx + config.txt + program.7z single_executable.exe.

                  在 Unix 上,你也可以自己創(chuàng)建一個(gè) SFX,如果你創(chuàng)建一個(gè) tar 存檔并將它附加到一個(gè) shell 腳本中,它會(huì)提取并解壓縮它,詳情請(qǐng)參閱 https://www.linuxjournal.com/node/1005818.

                  On Unix, you can also create yourself an SFX if you create a tar archive and append it to a shell script which extract it and unpack it, for details see https://www.linuxjournal.com/node/1005818.

                  這篇關(guān)于在 Windows 10 上使用 Nuitka 將 Python 3.6 腳本編譯為獨(dú)立 exe的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  How to make a discord bot that gives roles in Python?(如何制作一個(gè)在 Python 中提供角色的不和諧機(jī)器人?)
                  Discord bot isn#39;t responding to commands(Discord 機(jī)器人沒(méi)有響應(yīng)命令)
                  Can you Get the quot;About mequot; feature on Discord bot#39;s? (Discord.py)(你能得到“關(guān)于我嗎?Discord 機(jī)器人的功能?(不和諧.py))
                  message.channel.id Discord PY(message.channel.id Discord PY)
                  How do I host my discord.py bot on heroku?(如何在 heroku 上托管我的 discord.py 機(jī)器人?)
                  discord.py - Automaticaly Change an Role Color(discord.py - 自動(dòng)更改角色顏色)

                  <tfoot id='Ec8aS'></tfoot>
                • <small id='Ec8aS'></small><noframes id='Ec8aS'>

                      <legend id='Ec8aS'><style id='Ec8aS'><dir id='Ec8aS'><q id='Ec8aS'></q></dir></style></legend>

                    1. <i id='Ec8aS'><tr id='Ec8aS'><dt id='Ec8aS'><q id='Ec8aS'><span id='Ec8aS'><b id='Ec8aS'><form id='Ec8aS'><ins id='Ec8aS'></ins><ul id='Ec8aS'></ul><sub id='Ec8aS'></sub></form><legend id='Ec8aS'></legend><bdo id='Ec8aS'><pre id='Ec8aS'><center id='Ec8aS'></center></pre></bdo></b><th id='Ec8aS'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Ec8aS'><tfoot id='Ec8aS'></tfoot><dl id='Ec8aS'><fieldset id='Ec8aS'></fieldset></dl></div>
                        <tbody id='Ec8aS'></tbody>

                          <bdo id='Ec8aS'></bdo><ul id='Ec8aS'></ul>
                            主站蜘蛛池模板: 日韩免费毛片视频 | 精品一区二区免费视频 | 美女激情av | 色婷婷综合久久久中文字幕 | 美国十次成人欧美色导视频 | 最新国产精品视频 | 欧美电影一区 | 欧美在线视频网 | 国产高清在线视频 | 免费污视频 | 国产高清视频 | 欧美激情久久久 | 国产精品日韩一区二区 | 91xxx在线观看 | 99热精品久久 | 久久久久国产一区二区三区 | 国产三级一区二区三区 | 色综合久久天天综合网 | 亚洲天堂一区二区 | 男人天堂手机在线视频 | 天堂一区 | 日韩成人一区二区 | 国产精品日韩欧美一区二区三区 | 国产精品乱码一区二区三区 | 天天爽夜夜爽精品视频婷婷 | 日本中文字幕一区 | 我想看一级黄色毛片 | 午夜久久久 | 日韩第一页| 久久久久91 | 在线看免费 | 在线免费av电影 | 亚洲美乳中文字幕 | 国内自拍第一页 | 日韩国产黄色片 | 中文字幕一区二区三区精彩视频 | 亚洲精品在线视频 | 久久久国产一区二区三区 | 1区2区3区视频 | 成人免费在线 | 色精品视频 |