python – 为什么运行stratum mining proxy时会出现“ImportErro
发布时间:2020-12-20 13:41:42 所属栏目:Python 来源:网络整理
导读:运行“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-mac
运行“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. 这让我相信没有安装zope.interface.所以我尝试安装它: 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 我还发现this post,你说你基本上需要把init.py放到文件夹中.所以我这样做: sudo touch /usr/local/lib/python2.7/site-packages/zope.interface-4.1.1/__init__.py 我尝试再次运行挖掘代理,同样的错误.请帮忙. 解决方法
我有同样的错误.
谷歌搜索后我发现触摸应该在不同的地方: 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 stratum-proxy成功运作.希望能帮助到你 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |