Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: Twisted requires zope.interface 3.6.0 or later: no module named zope.interface. #66

Closed
kpdyer opened this issue Nov 19, 2013 · 1 comment
Assignees
Milestone

Comments

@kpdyer
Copy link
Owner

kpdyer commented Nov 19, 2013

Using a vanilla OSX virtuabox image, I run the following script:

https://raw.github.com/kpdyer/fteproxy/87052d23e3b0004d738551d1e7ca28314609258d/BUILDING.osx

Then, when running the inplace version of fteproxy we have success:

osxs-Mac-Pro:fteproxy vagrant$ ./bin/fteproxy --mode client
FTE Copyright (C) 2012-2013 Kevin P. Dyer <kdyer@cs.pdx.edu>
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it under certain conditions.

Client ready!

However, when we attempt to run the pyinstaller-bundled version we get:

osxs-Mac-Pro:fteproxy vagrant$ ./dist/fteproxy --mode client
Traceback (most recent call last):
  File "<string>", line 23, in <module>
  File "/usr/local/lib/python2.7/site-packages/PyInstaller/loader/pyi_importers.py", line 270, in load_module
    exec(bytecode, module.__dict__)
  File "/Users/vagrant/fteproxy/build/fteproxy/out00-PYZ.pyz/twisted", line 53, in <module>
  File "/Users/vagrant/fteproxy/build/fteproxy/out00-PYZ.pyz/twisted", line 37, in _checkRequirements
ImportError: Twisted requires zope.interface 3.6.0 or later: no module named zope.interface.
@kpdyer
Copy link
Owner Author

kpdyer commented Nov 19, 2013

So, fteproxy depends upon obfsproxy which depdends upon twisted which depdends upon zope.interface.

Apparently this is a well-known issue with pyinstaller but they have no near-term plans to fix it:

http://www.pyinstaller.org/ticket/502
http://www.pyinstaller.org/ticket/615

Thanks to the suggestion here: https://groups.google.com/forum/#!msg/pyinstaller/POYwzd-VrHU/ycbGN85sUD4J, the following hack works:

sudo touch /usr/local/lib/python2.7/site-packages/zope/__init__.py

This solution assumes we're using the homebrew version of python.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant