'PyDevTerminalInteractiveShell' object has no attribute 'has_readline'

前端 未结 4 722
庸人自扰
庸人自扰 2021-02-06 22:30

I am using Pycharm 2016.1 on CentOS7 and I am testing "Show command line afterwards" and I got this Probl

相关标签:
4条回答
  • 2021-02-06 22:37

    This PyCharm issue occurs because of changes the the iPython api with iPython version 5. Until Jetbrains fix this, reverting to an earlier version of iPython (version 4) will correct this. As @chenfei has discovered, this can be done through pip:

    $ pip uninstall ipython
    $ pip install ipython==4.2.0
    

    Edit

    And if you can't wait that long, Jetbrains have released a patch

    https://youtrack.jetbrains.com/issue/PY-20013#comment=27-1512407

    Final Edit

    This issue has been fixed in PyCharm 2016.2

    0 讨论(0)
  • 2021-02-06 22:38

    The way I managed to solve this problem without downgrading iPython was:

    1 - Download the following patch:

    https://youtrack.jetbrains.com/_persistent/pycharm_ipython5_fix.patch?file=74-327779&c=true

    2 - Inside PyCharm, create a new project located on:

    <PyCharm installation folder>/helpers/pydev/_pydev_bundle/
    

    Pycharm will prompt you to import the files on that folder, accept.

    3 - Click on VCS and choose Apply Patch

    4 - Choose the file you've downloaded on step 1.

    5 - The Apply Patch window will open, click OK

    6 - Restart PyCharm

    The Python Console should be now working inside PyCharm


    PS: You can delete the project folder (.idea) you've created on Step 2

    0 讨论(0)
  • 2021-02-06 22:43

    It's solved in Pycharm 2016.2. See here: https://intellij-support.jetbrains.com/hc/en-us/community/posts/207207329-ipython-5-not-supported-by-Pycharm-s-python-console-

    0 讨论(0)
  • 2021-02-06 22:49

    I solved my problem via installing ipython version 4.2:

    pip uninstall ipython
    pip install ipython==4.2.0
    
    0 讨论(0)
提交回复
热议问题