ImportError: No module named zope.interface

前端 未结 3 1495
轻奢々
轻奢々 2021-01-04 08:24

I am trying to run server for iphone using http://www.raywenderlich.com/3932/how-to-create-a-socket-based-iphone-app-and-server

My machine is mac 10.6.8 Python versi

3条回答
  •  無奈伤痛
    2021-01-04 09:16

    Here's a solution

    It says that installing a zope module through pip breaks your zope installation because pip installs it in another directory other than the original zope module directory.

    From the link

    After install a zope module using pip, for example z3c.password your zope installation gets broken.

    This is because pip have installed the module in /usr/local/lib/python2.6/dist-packages/zope and the original module zope.interface is in /usr/share/pyshared/zope/interface/ and has minor relevance when importing.

    What worked for me is (also given in the link):

    cd /usr/local/lib/python2.7/dist-packages/zope 
    sudo ln -s /usr/share/pyshared/zope/interface/
    

提交回复
热议问题