ImportError:无法导入名称ResourceError

时间:2013-02-26 09:07:40

标签: python couchdb debian

我尝试使用以下命令在debian上安装couchdb app

couchapp push http://user:pass@localhost:5984/acra-appname

我输出了以下错误:

Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/restkit/__init__.py", line 9, in <module>
    from restkit.conn import Connection
  File "/usr/local/lib/python2.6/dist-packages/restkit/conn.py", line 14, in <module>
    from socketpool import Connector
ImportError: No module named socketpool
Traceback (most recent call last):
  File "/usr/local/bin/couchapp", line 7, in <module>
    from couchapp.dispatch import run
  File "/usr/local/lib/python2.6/dist-packages/couchapp/dispatch.py", line 10, in <module>
    import couchapp.commands as commands
  File "/usr/local/lib/python2.6/dist-packages/couchapp/commands.py", line 15, in <module>
    from couchapp import clone_app
  File "/usr/local/lib/python2.6/dist-packages/couchapp/clone_app.py", line 15, in <module>
    from couchapp.errors import AppError
  File "/usr/local/lib/python2.6/dist-packages/couchapp/errors.py", line 7, in <module>
    from restkit import ResourceError
ImportError: cannot import name ResourceError

据我所知,错误是:

ImportError: No module named socketpool

如何安装此模块或如何解决问题?

2 个答案:

答案 0 :(得分:0)

Ifthikhan sugessted:使用apt-get之类的包管理器安装它,然后使用pip你可以安装socketpool。

答案 1 :(得分:0)

安装couchapp时遇到了这个问题。我使用pip来安装它,我认为它已经完成了,但是当我运行它时我遇到了ImportError问题。原来pip安装没有成功,我首先需要:

apt-get install python-dev

然后当我做了

pip install couchapp 

安装了所有依赖项,并且couchapp运行没有问题。