![](/img/trans.png)
[英]OSError: [WinError 126] The specified module could not be found?
[英]OSError: [WinError 126] The specified module could not be found in pyinstaller
我是 python 的初學者,並嘗試使用稱為 fbs 的 pyinstaller 的衍生物將 a.py 腳本轉換為 .exe,所以這個問題可能很愚蠢,我提前道歉。
我按照使用 python 3.6.7 的說明使用它,並按照指示導入虛擬環境中的所有模塊。 程序運行但 fbs freeze 沒有工作。 轉向“無法執行腳本主程序”錯誤。 我運行 fbs freeze --debug 方法,現在我發現了這個錯誤:
回溯(最近一次調用):文件“lib\site-packages\PyInstaller\loader\pyiboot01_bootstrap.py”,第 172 行,在 init 文件“ctypes_init_.py”,第 348 行,在 init OSError: [WinError 126] The specified找不到模塊在處理上述異常過程中,出現另一個異常:''''''''''''''''''''''''''''''''' ''''''
文件“lib\site-packages\PyInstaller\loader\pyiboot01_bootstrap.py”,第 174 行, init main.PyInstallerImportError: Failed to load dynlib/dll 'C:\Users\ALEXIS\Desktop\DEVELOP\target\Test5\sklearn. 庫\vcomp140.dll'。 當應用程序被凍結時,很可能沒有找到這個 dynlib/dll。 [6916] 無法執行腳本 main
我嘗試了一些解決方案,建議將 --path 添加到包含 Qt5Widgets.dll,"Qt5Core.dll"] 和 "Qt5Gui.dll" 的文件夾中,但沒有成功。 我還嘗試將這些 dll 文件添加到 json 文件中作為隱藏導入,但效果不佳。
我希望你能指出我正確的方向。
謝謝,
我在這個線程上的回答可能有助於在fbs freeze
包含各種資源。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.