在Mac上:
Traceback (most recent call last):
File "project1/scripts/initializedb.py", line 3, in <module>
import transaction
File "/Users/denmojo/code/project1/env/lib/python3.5/site-packages/transaction/__init__.py", line 19, in <module>
from transaction._transaction import Transaction
File "/Users/denmojocode/project1/env/lib/python3.5/site-packages/transaction/_transaction.py", line 20, in <module>
from zope.interface import implementer
ImportError: No module named 'zope.interface'
无法找出原因,但不能导入模块。
Using /Users/denmojo/code/project1/env/lib/python3.5/site-packages/zope.interface-4.3.2-py3.5-macosx-10.6-intel.egg
答案 0 :(得分:1)
尝试:
pip uninstall transaction
pip uninstall zope.interface
pip install transaction
pip install zope.interface
解决了这个问题。我想我之前的virtualenv设置或无序的pip安装导致zope.interface-4.3.2-py3.5-macosx-10.6-intel.egg