python
import pyramid.config
Then, ʻImportError: No module named interface came to be said. ʻEasy_install zope.interface
doesn't help, so I investigated the cause.
python
In [1]: import zope.interface
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-4-bc61dfc4e3ea> in <module>()
----> 1 import zope.interface
ImportError: No module named interface
ipython
In [1]: import sys
In [2]: sys.path
Out[2]:
['',
'/usr/bin',
'/usr/local/lib/python2.7/dist-packages',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-x86_64-linux-gnu',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages/PILcompat',
'/usr/lib/python2.7/dist-packages/gtk-2.0',
'/usr/lib/pymodules/python2.7',
'/usr/lib/python2.7/dist-packages/ubuntu-sso-client',
'/usr/lib/python2.7/dist-packages/IPython/extensions']
python
$ locate zope | more
...
/usr/local/lib/python2.7/dist-packages/zope
...
/usr/lib/python2.7/dist-packages/zope.interface-4.0.5.egg-info
...
/usr/share/pyshared/zope.interface-4.0.5.egg-info
...
python
$ ls /usr/local/lib/python2.7/dist-packages/zope
deprecation
Removed because this package is in the way.
python
$ sudo rm -r /usr/local/lib/python2.7/dist-packages/zope*
python
$ sudo easy_install zope.interface
$ sudo easy_install zope.deprecation
python
import pyramid.config
Succeeded.
python
import zope.interface
help(zope.interface)
...
FILE
/usr/lib/python2.7/dist-packages/zope/interface/__init__.py
Recommended Posts