windows下安装IPython

IPython是什么?

IPython是一个 python 的交互式 shell,比默认的python shell 好用得多,支持变量自动补全,自动缩近,支持 bash shell 命令,内置了许多很有用的功能和函数。

看看官方的介绍:

IPython provides a rich toolkit to help you make the most out of using Python interactively. Its main components are:

  • Powerful Python shells (terminal- and Qt-based).
  • A web-based notebook with the same core features but support for rich media, text, code, mathematical expressions and inline plots.
  • Support for interactive data visualization and use of GUI toolkits.
  • Flexible, embeddable interpreters to load into your own projects.
  • Tools for high level and interactive parallel computing.

Windows下安装IPython

Linux下可以直接在线安装,比如sudo yum install ipython

在Windows下,有一些依赖。我先开始只安装了IPython,结果提示:

Traceback (most recent call last):
  File "C:\Python27\Scripts\ipython-script.py", line 5, in <module>
    from pkg_resources import load_entry_point
ImportError: No module named pkg_resources

后来查了一下IPython官方的安装文档,关于Windows下安装IPython:

Windows

Note

On Windows, IPython requires setuptools or distribute.

We hope to remove this dependency in the future.

There are a few caveats for Windows users. The main issue is that a basic python setup.py install approach won’t create .bat file or Start Menu shortcuts, which most users want. To get an installation with these, you can use any of the following alternatives:

  1. Install using easy_install.
  2. Install using our binary .exe Windows installer, which can be found here
  3. Install from source, but using setuptools (python setupegg.py install).

IPython by default runs in a terminal window, but the normal terminal application supplied by Microsoft Windows is very primitive. You may want to download the excellent and free Console application instead, which is a far superior tool. You can even configure Console to give you by default an IPython tab, which is very convenient to create new IPython sessions directly from the working terminal.

 

后来才发现需要安装setuptools,于是到官方页面去下载了。

 

ipython

发布者

Tanky Woo

Tanky Woo,[个人主页:https://tankywoo.com] / [新博客:https://blog.tankywoo.com]

《windows下安装IPython》有5个想法

发表评论

电子邮件地址不会被公开。 必填项已用*标注