简体   繁体   English

pyinstaller导入错误:找不到zope.interface

[英]Pyinstaller import error: zope.interface not found

I am trying to create standalone exe of twisted application using PyInstaller. 我正在尝试使用PyInstaller创建扭曲应用程序的独立exe。 Everything is ok, even executable file is getting build, but its not working. 一切正常,即使可执行文件正在构建中,但无法正常工作。 I mean if try to execute it gives error 'Import error: Twisted requires zope.interface 3.6.0 or later: no module named zope.interface." 我的意思是,如果尝试执行该操作,则会出现错误“导入错误:Twisted需要zope.interface 3.6.0或更高版本:没有名为zope.interface的模块。”

I already have installed zope.interface 4.1.0. 我已经安装了zope.interface 4.1.0。 Also twisted application is running fine, with 'python ' But at the time of building executable file Pyinstaller is unble to import zope.interface. 使用python,扭曲的应用程序也可以正常运行,但是在构建可执行文件时,Pyinstaller无法导入zope.interface。

How to solve this issue? 如何解决这个问题?

Thank you in advance. 先感谢您。

finally problem solved. 终于问题解决了。 Problem is zope.interface is not getting added in PYTHONPATH. 问题是zope.interface没有被添加到PYTHONPATH中。 Actually I have tried different setups (like pip & exe), though it was not getting added. 实际上,我没有尝试添加其他设置(例如pip和exe)。 Exact reason I don't know. 我不知道的确切原因。 But after installing zope.interface using 'easy_install ', it is added in PYTHONPATH & I am able to create executable file. 但是使用'easy_install'安装zope.interface之后,它被添加到PYTHONPATH中,并且我能够创建可执行文件。

Thank you for taking interest. 感谢您的关注。

也许会对您的问题有所帮助: http : //github.com/kpdyer/fteproxy/issues/66

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM