公司项目中用到了python 2.7,我在windows下需要引入 readline模块,在pycharm里安装该模块会报错:

Collecting readline==6.2.4.1
  Downloading readline-6.2.4.1.tar.gz (2.3MB)
    Complete output from command python setup.py egg_info:
    error: this module is not meant to work on Windows
    —————————————-
Command “python setup.py egg_info” failed with error code 1 in C:\Users\10716\AppData\Local\Temp\pycharm-packaging\readline\
You are using pip version 9.0.1, however version 9.0.3 is available.
You should consider upgrading via the ‘python -m pip install –upgrade pip’ command.
报错截图:
报错的原因:
安装的readline不支持windows平台。
解决办法:
安装 pyreadline模块就可以(pycharm里可以直接搜,然后安装)。
easy_install pyreadline

or:

pip install pyreadline

http://pypi.python.org/pypi/pyreadline
Also, use the following for forward/reverse compatibility:

try:
  import readline
except ImportError:
  import pyreadline as readline

 

参考 :

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.