Show More
@@ -1,180 +1,180 b'' | |||||
1 | IPython requires Python 2.7 or ≥ 3.3. |
|
1 | IPython requires Python 2.7 or ≥ 3.3. | |
2 |
|
2 | |||
3 | .. seealso:: |
|
3 | .. seealso:: | |
4 |
|
4 | |||
5 | `Installing Jupyter <http://jupyter.readthedocs.org/en/latest/install.html>`__ |
|
5 | `Installing Jupyter <http://jupyter.readthedocs.org/en/latest/install.html>`__ | |
6 | The Notebook, nbconvert, and many other former pieces of IPython are now |
|
6 | The Notebook, nbconvert, and many other former pieces of IPython are now | |
7 | part of Project Jupyter. |
|
7 | part of Project Jupyter. | |
8 |
|
8 | |||
9 |
|
9 | |||
10 | Quickstart |
|
10 | Quickstart | |
11 | ========== |
|
11 | ========== | |
12 |
|
12 | |||
13 | If you have :mod:`pip`, |
|
13 | If you have :mod:`pip`, | |
14 | the quickest way to get up and running with IPython is: |
|
14 | the quickest way to get up and running with IPython is: | |
15 |
|
15 | |||
16 | .. code-block:: bash |
|
16 | .. code-block:: bash | |
17 |
|
17 | |||
18 | $ pip install ipython |
|
18 | $ pip install ipython | |
19 |
|
19 | |||
20 | To use IPython with notebooks or the Qt console, you should also install |
|
20 | To use IPython with notebooks or the Qt console, you should also install | |
21 | ``jupyter``. |
|
21 | ``jupyter``. | |
22 |
|
22 | |||
23 | To run IPython's test suite, use the :command:`iptest` command: |
|
23 | To run IPython's test suite, use the :command:`iptest` command: | |
24 |
|
24 | |||
25 | .. code-block:: bash |
|
25 | .. code-block:: bash | |
26 |
|
26 | |||
27 | $ iptest |
|
27 | $ iptest | |
28 |
|
28 | |||
29 |
|
29 | |||
30 | Overview |
|
30 | Overview | |
31 | ======== |
|
31 | ======== | |
32 |
|
32 | |||
33 | This document describes in detail the steps required to install IPython. |
|
33 | This document describes in detail the steps required to install IPython. | |
34 | For a few quick ways to get started with package managers or full Python distributions, |
|
34 | For a few quick ways to get started with package managers or full Python distributions, | |
35 | see `the install page <http://ipython.org/install.html>`_ of the IPython website. |
|
35 | see `the install page <http://ipython.org/install.html>`_ of the IPython website. | |
36 |
|
36 | |||
37 | Please let us know if you have problems installing IPython or any of its dependencies. |
|
37 | Please let us know if you have problems installing IPython or any of its dependencies. | |
38 |
|
38 | |||
39 | IPython and most dependencies can be installed via :command:`pip`. |
|
39 | IPython and most dependencies can be installed via :command:`pip`. | |
40 | In many scenarios, this is the simplest method of installing Python packages. |
|
40 | In many scenarios, this is the simplest method of installing Python packages. | |
41 | More information about :mod:`pip` can be found on |
|
41 | More information about :mod:`pip` can be found on | |
42 | `its PyPI page <http://pypi.python.org/pypi/pip>`__. |
|
42 | `its PyPI page <http://pypi.python.org/pypi/pip>`__. | |
43 |
|
43 | |||
44 |
|
44 | |||
45 | More general information about installing Python packages can be found in |
|
45 | More general information about installing Python packages can be found in | |
46 | `Python's documentation <http://docs.python.org>`_. |
|
46 | `Python's documentation <http://docs.python.org>`_. | |
47 |
|
47 | |||
48 |
|
48 | |||
49 | Installing IPython itself |
|
49 | Installing IPython itself | |
50 | ========================= |
|
50 | ========================= | |
51 |
|
51 | |||
52 | Given a properly built Python, the basic interactive IPython shell will work |
|
52 | Given a properly built Python, the basic interactive IPython shell will work | |
53 | with no external dependencies. However, some Python distributions |
|
53 | with no external dependencies. However, some Python distributions | |
54 | (particularly on Windows and OS X), don't come with a working :mod:`readline` |
|
54 | (particularly on Windows and OS X), don't come with a working :mod:`readline` | |
55 | module. The IPython shell will work without :mod:`readline`, but will lack |
|
55 | module. The IPython shell will work without :mod:`readline`, but will lack | |
56 | many features that users depend on, such as tab completion and command line |
|
56 | many features that users depend on, such as tab completion and command line | |
57 | editing. If you install IPython with :mod:`pip`, |
|
57 | editing. If you install IPython with :mod:`pip`, | |
58 | then the appropriate :mod:`readline` for your platform will be installed. |
|
58 | then the appropriate :mod:`readline` for your platform will be installed. | |
59 | See below for details of how to make sure you have a working :mod:`readline`. |
|
59 | See below for details of how to make sure you have a working :mod:`readline`. | |
60 |
|
60 | |||
61 | Installation using pip |
|
61 | Installation using pip | |
62 | ---------------------- |
|
62 | ---------------------- | |
63 |
|
63 | |||
64 | If you have :mod:`pip`, the easiest way of getting IPython is: |
|
64 | If you have :mod:`pip`, the easiest way of getting IPython is: | |
65 |
|
65 | |||
66 | .. code-block:: bash |
|
66 | .. code-block:: bash | |
67 |
|
67 | |||
68 | $ pip install ipython |
|
68 | $ pip install ipython | |
69 |
|
69 | |||
70 | That's it. |
|
70 | That's it. | |
71 |
|
71 | |||
72 |
|
72 | |||
73 | Installation from source |
|
73 | Installation from source | |
74 | ------------------------ |
|
74 | ------------------------ | |
75 |
|
75 | |||
76 | If you don't want to use :command:`pip`, or don't have it installed, |
|
76 | If you don't want to use :command:`pip`, or don't have it installed, | |
77 | grab the latest stable tarball of IPython `from PyPI |
|
77 | grab the latest stable tarball of IPython `from PyPI | |
78 | <https://pypi.python.org/pypi/ipython>`__. Then do the following: |
|
78 | <https://pypi.python.org/pypi/ipython>`__. Then do the following: | |
79 |
|
79 | |||
80 | .. code-block:: bash |
|
80 | .. code-block:: bash | |
81 |
|
81 | |||
82 | $ tar -xzf ipython.tar.gz |
|
82 | $ tar -xzf ipython.tar.gz | |
83 | $ cd ipython |
|
83 | $ cd ipython | |
84 |
$ p |
|
84 | $ pip install . | |
85 |
|
85 | |||
86 | If you are installing to a location (like ``/usr/local``) that requires higher |
|
86 | If you are installing to a location (like ``/usr/local``) that requires higher | |
87 | permissions, you may need to run the last command with :command:`sudo`. |
|
87 | permissions, you may need to run the last command with :command:`sudo`. | |
88 |
|
88 | |||
89 |
|
89 | |||
90 | Installing the development version |
|
90 | Installing the development version | |
91 | ---------------------------------- |
|
91 | ---------------------------------- | |
92 |
|
92 | |||
93 | It is also possible to install the development version of IPython from our |
|
93 | It is also possible to install the development version of IPython from our | |
94 | `Git <http://git-scm.com/>`_ source code repository. To do this you will |
|
94 | `Git <http://git-scm.com/>`_ source code repository. To do this you will | |
95 | need to have Git installed on your system. Then do: |
|
95 | need to have Git installed on your system. Then do: | |
96 |
|
96 | |||
97 | .. code-block:: bash |
|
97 | .. code-block:: bash | |
98 |
|
98 | |||
99 |
$ git clone |
|
99 | $ git clone https://github.com/ipython/ipython.git | |
100 | $ cd ipython |
|
100 | $ cd ipython | |
101 |
$ p |
|
101 | $ pip install . | |
102 |
|
102 | |||
103 | Some users want to be able to follow the development branch as it changes. If |
|
103 | Some users want to be able to follow the development branch as it changes. If | |
104 | you have :mod:`pip`, you can replace the last step by: |
|
104 | you have :mod:`pip`, you can replace the last step by: | |
105 |
|
105 | |||
106 | .. code-block:: bash |
|
106 | .. code-block:: bash | |
107 |
|
107 | |||
108 | $ pip install -e . |
|
108 | $ pip install -e . | |
109 |
|
109 | |||
110 | This creates links in the right places and installs the command line script to |
|
110 | This creates links in the right places and installs the command line script to | |
111 | the appropriate places. |
|
111 | the appropriate places. | |
112 |
|
112 | |||
113 | Then, if you want to update your IPython at any time, do: |
|
113 | Then, if you want to update your IPython at any time, do: | |
114 |
|
114 | |||
115 | .. code-block:: bash |
|
115 | .. code-block:: bash | |
116 |
|
116 | |||
117 | $ git pull |
|
117 | $ git pull | |
118 |
|
118 | |||
119 | .. _dependencies: |
|
119 | .. _dependencies: | |
120 |
|
120 | |||
121 | Dependencies |
|
121 | Dependencies | |
122 | ============ |
|
122 | ============ | |
123 |
|
123 | |||
124 | IPython relies on a number of other Python packages. Installing using a package |
|
124 | IPython relies on a number of other Python packages. Installing using a package | |
125 | manager like pip or conda will ensure the necessary packages are installed. If |
|
125 | manager like pip or conda will ensure the necessary packages are installed. If | |
126 | you install manually, it's up to you to make sure dependencies are installed. |
|
126 | you install manually, it's up to you to make sure dependencies are installed. | |
127 | They're not listed here, because they may change from release to release, so a |
|
127 | They're not listed here, because they may change from release to release, so a | |
128 | static list will inevitably get out of date. |
|
128 | static list will inevitably get out of date. | |
129 |
|
129 | |||
130 | It also has one key non-Python dependency which you may need to install separately. |
|
130 | It also has one key non-Python dependency which you may need to install separately. | |
131 |
|
131 | |||
132 | readline |
|
132 | readline | |
133 | -------- |
|
133 | -------- | |
134 |
|
134 | |||
135 | IPython's terminal interface relies on readline to provide features like tab |
|
135 | IPython's terminal interface relies on readline to provide features like tab | |
136 | completion and history navigation. If you only want to use IPython as a kernel |
|
136 | completion and history navigation. If you only want to use IPython as a kernel | |
137 | for Jupyter notebooks and other frontends, you don't need readline. |
|
137 | for Jupyter notebooks and other frontends, you don't need readline. | |
138 |
|
138 | |||
139 |
|
139 | |||
140 | **On Windows**, to get full console functionality, *PyReadline* is required. |
|
140 | **On Windows**, to get full console functionality, *PyReadline* is required. | |
141 | PyReadline is a separate, Windows only implementation of readline that uses |
|
141 | PyReadline is a separate, Windows only implementation of readline that uses | |
142 | native Windows calls through :mod:`ctypes`. The easiest way of installing |
|
142 | native Windows calls through :mod:`ctypes`. The easiest way of installing | |
143 | PyReadline is you use the binary installer available `here |
|
143 | PyReadline is you use the binary installer available `here | |
144 | <http://pypi.python.org/pypi/pyreadline>`__. |
|
144 | <http://pypi.python.org/pypi/pyreadline>`__. | |
145 |
|
145 | |||
146 | **On OS X**, if you are using the built-in Python shipped by Apple, you will be |
|
146 | **On OS X**, if you are using the built-in Python shipped by Apple, you will be | |
147 | missing a proper readline implementation as Apple ships instead a library called |
|
147 | missing a proper readline implementation as Apple ships instead a library called | |
148 | ``libedit`` that provides only some of readline's functionality. While you may |
|
148 | ``libedit`` that provides only some of readline's functionality. While you may | |
149 | find libedit sufficient, we have occasional reports of bugs with it and several |
|
149 | find libedit sufficient, we have occasional reports of bugs with it and several | |
150 | developers who use OS X as their main environment consider libedit unacceptable |
|
150 | developers who use OS X as their main environment consider libedit unacceptable | |
151 | for productive, regular use with IPython. |
|
151 | for productive, regular use with IPython. | |
152 |
|
152 | |||
153 | Therefore, IPython on OS X depends on the :mod:`gnureadline` module. |
|
153 | Therefore, IPython on OS X depends on the :mod:`gnureadline` module. | |
154 | We will *not* consider completion/history problems to be bugs for IPython if you |
|
154 | We will *not* consider completion/history problems to be bugs for IPython if you | |
155 | are using libedit. |
|
155 | are using libedit. | |
156 |
|
156 | |||
157 | To get a working :mod:`readline` module on OS X, do (with :mod:`pip` |
|
157 | To get a working :mod:`readline` module on OS X, do (with :mod:`pip` | |
158 | installed): |
|
158 | installed): | |
159 |
|
159 | |||
160 | .. code-block:: bash |
|
160 | .. code-block:: bash | |
161 |
|
161 | |||
162 | $ pip install gnureadline |
|
162 | $ pip install gnureadline | |
163 |
|
163 | |||
164 | .. note:: |
|
164 | .. note:: | |
165 |
|
165 | |||
166 | Other Python distributions on OS X (such as Anaconda, fink, MacPorts) |
|
166 | Other Python distributions on OS X (such as Anaconda, fink, MacPorts) | |
167 | already have proper readline so you likely don't have to do this step. |
|
167 | already have proper readline so you likely don't have to do this step. | |
168 |
|
168 | |||
169 | When IPython is installed with :mod:`pip`, |
|
169 | When IPython is installed with :mod:`pip`, | |
170 | the correct readline should be installed if you specify the `terminal` |
|
170 | the correct readline should be installed if you specify the `terminal` | |
171 | optional dependencies: |
|
171 | optional dependencies: | |
172 |
|
172 | |||
173 | .. code-block:: bash |
|
173 | .. code-block:: bash | |
174 |
|
174 | |||
175 | $ pip install "ipython[terminal]" |
|
175 | $ pip install "ipython[terminal]" | |
176 |
|
176 | |||
177 | **On Linux**, readline is normally installed by default. If not, install it |
|
177 | **On Linux**, readline is normally installed by default. If not, install it | |
178 | from your system package manager. If you are compiling your own Python, make |
|
178 | from your system package manager. If you are compiling your own Python, make | |
179 | sure you install the readline development headers first. |
|
179 | sure you install the readline development headers first. | |
180 |
|
180 |
General Comments 0
You need to be logged in to leave comments.
Login now