【问题标题】:Make pycharm use the real ipython console让pycharm使用真正的ipython控制台
【发布时间】:2017-11-07 08:56:43
【问题描述】:

在pycharm中,ipython控制台似乎不是真正的ipython控制台。

在 pycharm ipython 控制台中:

In[1]: ?sorted
{'text/plain': 'Signature: sorted(iterable, key=None, reverse=False)\nDocstring:\nReturn a ne

在真正的 ipython 控制台中:

In [5]: ?sorted
Signature: sorted(iterable, key=None, reverse=False)
Docstring:
Return a new list containing all items from the iterable in ascending order.

A custom key function can be supplied to customise the sort order, and the
reverse flag can be set to request the result in descending order.
Type:      builtin_function_or_method

我看到了其他一些差异:does not load ipython profiledifferent behavior when using shortcut to get back previous commands

在 pycharm 中有没有真正的 ipython 控制台?并且这个控制台仍然兼容在控制台中运行所选代码的快捷方式。

【问题讨论】:

    标签: python ipython pycharm


    【解决方案1】:

    可能是您在 PyCharm 和本地使用不同的虚拟环境/python 版本吗?这可以完美地解释输出的差异。

    你能在两者中运行这段代码并比较输出吗:

    import IPython; IPython.version_info
    

    编辑

    确认,即使版本相同,PyCharm 也会转换 ipython 的输出。

    【讨论】:

    • 在 pycharm 中,我得到了这个:import IPython; IPython.version_info Out[13]: (6, 1, 0, ''),在 ipython 中,我得到了相同的......
    猜你喜欢
    • 2013-11-17
    • 1970-01-01
    • 2015-08-29
    • 2020-07-21
    • 2017-09-27
    • 2016-01-11
    • 2014-08-29
    • 2014-10-13
    相关资源
    最近更新 更多