python
import pyramid.config
Dann wurde es als "ImportError: Kein Modul mit dem Namen interface" bezeichnet.
Auch wenn easy_install zope.interface
das Problem nicht löst, habe ich die Ursache untersucht.
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
Entfernt, da dieses Paket im Weg ist.
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
Erfolgreich.
python
import zope.interface
help(zope.interface)
...
FILE
/usr/lib/python2.7/dist-packages/zope/interface/__init__.py
Recommended Posts