分享

import readline,ImportError: No module named readline

 豆芽爱尚阅 2015-04-08

I was the first time to download the source of Android, but when I used repo init according to the website http://source./source/downloading.html, something wrong happened , I have faced with this error:

Traceback (most recent call last):
  File "/root/bin/repo", line 91, in <module>
    import readline
ImportError: No module named readline

I am using Ubuntu 10.04 and Python 2.7.2

I will be appreciated if anybody can help me.

asked Feb 28 '12 at 6:43
enterzhu
2515

2 Answers

up vote 3 down vote accepted

AFAIK, the default Python environment in Ubuntu 10.04 is Python 2.6.5, so you must be using a self-compiled python.

You should be missing some readline header files when building your python 2.7.2, so you have two choices now:

  1. Re-compile your python, with libreadline?-dev installed.
  2. Install the standalone version of readline, using pip install readline or easy_install readline
answered Feb 28 '12 at 6:52
Felix Yan
4,60142648

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多