Jul 4, 2011

repo init throws import readline error

While I was attempting to use the repo init command for downloading Android source code, it threw an error about importing the readline module like this:
Traceback (most recent call last):
File "/Users/xxx/bin/repo", line 91, in <module> import readline
ImportError: No module named readline
I found the same problem on Issue 1032 of Android open source project.

This happend because the python readline module was not included as part of OSX. To fix this problem, you have to install the python readline module.
sudo port install py25-readline
If you are using Python that is contained in OSX, you have to change it to MacPort's Python.
sudo port select python python25
I am using Mac OS X as a UNIX with better UI. I like Mac OS BUT Mac OS X has a lot of problem for programming environment as I mentioned before ><

No comments:

Post a Comment