我在我的應用程序使用pyquery
,當我在dist目錄中運行MAIN.EXE,錯誤occures:py2exe導入錯誤:沒有模塊名爲cssselect
Traceback (most recent call last):
File "main.py", line 4, in <module>
File "zipextimporter.pyo", line 82, in load_module
File "f2.pyo", line 4, in <module>
File "zipextimporter.pyo", line 82, in load_module
File "pyquery\__init__.pyo", line 11, in <module>
File "zipextimporter.pyo", line 82, in load_module
File "pyquery\pyquery.pyo", line 6, in <module>
File "zipextimporter.pyo", line 82, in load_module
File "pyquery\cssselectpatch.pyo", line 6, in <module>
ImportError: No module named cssselect
但正如你所看到的,pyquery使用cssselectpatch不cssselect ,如何解決它?
請發表你的'setup.py'。 'cssselectpatch'嘗試導入'cssselect',但找不到它。 – 2013-06-02 22:35:15
# - * - 編碼:UTF-8 - * - 從distutils.core進口設置 進口py2exe #技術*** INCLUDES = [] 選項= { 「py2exe」: { 「壓縮」: 1,「optimize」:2, 「bundle_files」:2, 「includes」:[「pyquery」], 「dll_excludes」:[「MSVCP90.dll」,「mswsock.dll」,「powrprof.dll」, 「w9xpopen.exe」]}} 設置( 選項=選項, 描述= 「鬼谷子」, zip文件=無, 控制檯= [{ 「腳本」: 「main.py」}], ) – lhdgriver 2013-06-10 13:41:19
別不要把它作爲評論發佈,我們e改爲問題左下方的編輯按鈕。 – thegrinner 2013-06-10 20:39:47