2016-12-08 87 views
0

當我在virtual_env中編譯時發生錯誤。如果編譯時沒有virtual_env,它就可以工作。在一般環境中,軟件包安裝在相同的virtual_env中。如果編譯程序「hello world」,所有工作。但是,如果添加「扭曲」包,則會顯示錯誤。
在virtual_env中使用pyinstaller時win32com錯誤

pyinstaller - 3.2
的Python 2.7.12
setuptools的30.2.0
平臺:Linux-4.4.0-53-通用-x86_64的與 - Ubuntu的16.04,xenial

項目本身需要包

進口JSON,ctypes的,logging.handlers,操作系統,sqlite3的,pyudev, 子,SYS,線程,時間,日期時間,多處理

從twisted.internet導入反應器,任務
從twisted.internet.defer進口inlineCallbacks,的returnValue
從autobahn.twisted.wamp進口ApplicationSession,ApplicationRunner
從autobahn.twisted.websocket進口WebSocketServerProtocol,WebSocketServerFactory
從autobahn.wamp.exception進口的ApplicationError
從websocket_server進口WebsocketServer

17428 INFO: Loading module hook "hook-encodings.py"...
17817 INFO: Loading module hook "hook-xml.dom.domreg.py"...
17817 INFO: Loading module hook "hook-pkg_resources.py"...
18077 INFO: Processing pre-safe import module hook win32com Traceback (most recent call last):
File "", line 2, in ImportError: No module named win32com 18198 INFO: Processing pre-safe import module hook win32com Traceback (most recent call last):
File "", line 2, in ImportError: No module named win32com 18317 INFO: Processing pre-safe import module hook win32com Traceback (most recent call last):
File "", line 2, in ImportError: No module named win32com 18451 INFO: Processing pre-safe import module hook win32com Traceback (most recent call last):
File "", line 2, in ImportError: No module named win32com 18885 INFO: Loading module hook "hook-nacl.py"...
18914 INFO: Loading module hook "hook-cryptography.py"...
18973 INFO: Loading module hook "hook-sqlite3.py"...

w ^母雞啓動程序:

ImportError: No module named zope.interface Failed to execute script pyi_rth_twisted

但這模塊我在環境和一般單獨安裝。我嘗試玩不同版本的pyinstaller,setuptools,zope.interface。因此,仍然存在此錯誤

回答

0

必須添加一個空白__init__.py文件,其中包含您的zope程序包所在的位置。要查找已安裝zope,你可以運行:

help('zope') 

文件路徑應該是在底部。如果這個答案沒有意義,請嘗試搜索zope pyinstaller之類的內容。

+0

感謝您的回覆,但沒有任何幫助。尋求解決方案仍在繼續 –