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

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

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

      1. <tfoot id='xFNaL'></tfoot>

        Windows 10 上的 Python 多處理

        Python multiprocessing on Windows 10(Windows 10 上的 Python 多處理)

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

            1. <small id='c1HnR'></small><noframes id='c1HnR'>

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

                  本文介紹了Windows 10 上的 Python 多處理的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在 Windows 7 電腦和 Windows 10 筆記本電腦上運行一些代碼:

                  I'm running some code on both a Windows 7 pc and a Windows 10 laptop:

                  def project(filename):
                      **Do Something Here**
                  
                  
                  if __name__ == '__main__':
                      pool = Pool(processes=4)
                      results = [pool.apply_async(project, args=(filename,)) for filename in filenamelist]
                      output = [p.get() for p in results]
                      print output
                  

                  兩臺計算機都是雙核/4 線程,因此它們都應該可以很好地運行 4 個進程.我遇到的問題是,當我在 Windows 10 上運行代碼時,我運行了 4 個 python 進程,但它們使用 0% 的 cpu,并且它們不會輸出任何東西,這與 Windows 7 pc 不同,它將在所有 4線程和完美的工作.

                  Both computers are dual core/4 threads, so they should both be fine running 4 processes. The problem I have is that when I run the code on Windows 10 I get 4 python processes running, but they use 0% of the cpu and they will not output anything, unlike the Windows 7 pc which will run at full usage on all 4 threads and work perfectly.

                  如果我不使用多處理,代碼在 Windows 10 筆記本電腦上運行良好,所以問題一定與此有關.使用 Python 進行多處理還不能在 Windows 10 中運行嗎?順便說一句,我在兩臺機器上都運行 Python 2.7.

                  The code works fine on the Windows 10 laptop if I don't use multiprocessing, so the problem must be related to that. Does multiprocessing with Python not work in Windows 10 yet? I am running Python 2.7 on both machines by the way.

                  :Windows 7 電腦處理器是 i5-650,Windows 10 筆記本電腦處理器是 i3-2370M

                  : Windows 7 pc processor is an i5-650, Windows 10 laptop processor is an i3-2370M

                  [更新]:我將筆記本電腦恢復到 Windows 8.1,并且運行完全相同的代碼,這絕對是 Windows 10 的問題.

                  [Update]: I reverted the laptop back to Windows 8.1 and the exact same code runs as intended, this is definitely a Windows 10 issue.

                  :我用來生成 filenamelist 的方法如下,但是這在 Windows 7 上運行良好.

                  : The method I'm using to generate the filenamelist is as follows, however this works fine on Windows 7.

                  def get_unfinished_files(indir, outdir):
                      filenamelist = []
                      for filename in os.listdir(indir):
                          if filename not in os.listdir(outdir) and filename.endswith('.png'):
                              filenamelist.append(filename)
                      return filenamelist
                  

                  推薦答案

                  遇到了類似的問題.正如我發現的那樣,在我的情況下,這只是 python 中的一個錯誤:https://bugs.python.org/issue35797

                  Had similar issue. As I found, it was just a bug in python in my case: https://bugs.python.org/issue35797

                  通過venv使用multiprocessing時發生.

                  Bugfix 在 Python 3.7.3 中發布.

                  Bugfix is released in Python 3.7.3.

                  這篇關于Windows 10 上的 Python 多處理的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  How to bind a function to an Action from Qt menubar?(如何將函數綁定到 Qt 菜單欄中的操作?)
                  PyQt progress jumps to 100% after it starts(PyQt 啟動后進度躍升至 100%)
                  How to set yaxis tick label in a fixed position so that when i scroll left or right the yaxis tick label should be visible?(如何將 yaxis 刻度標簽設置在固定位置,以便當我向左或向右滾動時,yaxis 刻度標簽應該可見
                  `QImage` constructor has unknown keyword `data`(`QImage` 構造函數有未知關鍵字 `data`)
                  Change x-axis ticks to custom strings(將 x 軸刻度更改為自定義字符串)
                  How to show progress bar while saving file to excel in python?(如何在python中將文件保存為excel時顯示進度條?)
                • <legend id='m9Frc'><style id='m9Frc'><dir id='m9Frc'><q id='m9Frc'></q></dir></style></legend>

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

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

                        <tbody id='m9Frc'></tbody>

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

                            主站蜘蛛池模板: 免费网站在线 | 欧美一级全黄 | 黄色大片免费观看 | 中文区中文字幕免费看 | 中文字幕日韩欧美一区二区三区 | 国产精品福利在线观看 | 国产99久久 | 国产高清一区 | 亚洲第一网站 | 欧美全黄 | 在线永久看片免费的视频 | 色视频www在线播放国产人成 | 免费av毛片 | 日韩精品一区在线观看 | 国产亚洲成av人在线观看导航 | 日本在线一区二区 | 成人国产精品久久 | 91精品国产自产在线老师啪 | 欧美国产日韩一区二区三区 | 国产精品久久国产愉拍 | 日韩欧美一区二区三区免费观看 | 夜夜爽99久久国产综合精品女不卡 | 亚洲精品黄 | 亚洲精品黄色 | 啪啪av | 久久精品性视频 | 国产清纯白嫩初高生在线播放视频 | 色久伊人 | 欧美精品一区久久 | 日韩视频一区二区 | 91偷拍精品一区二区三区 | 欧美在线观看网站 | 日本在线综合 | 美女久久久久久久 | 免费精品 | 欧美h版| 在线视频三区 | 中文字幕在线一区二区三区 | 色婷婷综合久久久久中文一区二区 | 国产精品国产a级 | 最新中文在线视频 |