python版本是2.7.5,系统为centos7.x系列
错误代码:
0 1 2 3 4 5 6 7 8 9 |
[root@Shell site-packages]# python Python 2.7.5 (default, Mar 18 2016, 16:51:30) [GCC 4.4.7 20120313 (Red Hat 4.4.7-11)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import tab Traceback (most recent call last): File "<stdin>", line 1, in <module> File "tab.py", line 4, in <module> import readline ImportError: No module named readline |
解决方法:
0 1 2 3 4 5 |
[root@Shell site-packages]# cd /byrd/tools/ [root@Shell tools]# wget http://newcenturycomputers.net/projects/download.cgi/Readline-1.7.zip [root@Shell tools]# unzip Readline-1.7.zip [root@Shell tools]# cd Readline-1.7 [root@Shell Readline-1.7]# python setup.py build [root@Shell Readline-1.7]# python setup.py install |
申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!