Why do I get "ImportError: Twisted requires zope.interface 3.6.0 or later." when starting a stratum mining proxy?

All return when running "sudo python./mining_proxy.py":

Traceback (most recent call last):
  File "./mining_proxy.py", line 67, in <module>
    from twisted.internet import reactor, defer
  File "/Library/Python/2.7/site-packages/Twisted-13.2.0-py2.7-macosx-10.8-intel.egg/twisted/__init__.py", line 53, in <module>
    _checkRequirements()
  File "/Library/Python/2.7/site-packages/Twisted-13.2.0-py2.7-macosx-10.8-intel.egg/twisted/__init__.py", line 51, in _checkRequirements
    raise ImportError(required + ".")
ImportError: Twisted requires zope.interface 3.6.0 or later.

This makes me think that zope.interface is not installed. Therefore, I am trying to install it:

sudo easy_install zope.interface
Searching for zope.interface
Best match: zope.interface 4.1.1
Processing zope.interface-4.1.1-py2.7-macosx-10.8-intel.egg
zope.interface 4.1.1 is already the active version in easy-install.pth

Using /Library/Python/2.7/site-packages/zope.interface-4.1.1-py2.7-macosx-10.8-intel.egg
Processing dependencies for zope.interface
Finished processing dependencies for zope.interface

I also find this post which says that you basically need to put init .py in a folder. So I:

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

I am trying to start the proxy server again, same error. Please, help.

+4
source share
1 answer

I had the same error.

, :

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

.

virtualenv

:

pip install virtualenv virtualenvwrapper
mkvirtual stratum-proxy
pip install https://github.com/slush0/stratum-mining-proxy.git
pip install zope2

, - virtualenv . ,

+1

Source: https://habr.com/ru/post/1535722/


All Articles