官术网_书友最值得收藏!

Building NumPy, SciPy, matplotlib, and IPython from source

As a last resort or if we want to have the latest code, we can build from source. In practice, it shouldn't be that hard, although depending on your operating system, you might run into problems. As operating systems and related software are rapidly evolving, in such cases, the best you can do is search online or ask for help. In this chapter, we give pointers on good places to look for help.

The source code can be retrieved with git or as an archive from GitHub. The steps to install NumPy from source are straightforward and given here. We can retrieve the source code for NumPy with git as follows:

$ git clone git://github.com/numpy/numpy.git numpy

Note

There are similar commands for SciPy, matplotlib, and IPython (refer to the table that follows after this piece of information). The IPython source code can be downloaded from https://github.com/ipython/ipython/releases as a source archive or ZIP file. You can then unpack it with your favorite tool or with the following command:

$ tar -xzf ipython.tar.gz

Please refer to the following table for the git commands and source archive/zip links:

Install on /usr/local with the following command from the source code directory:

$ python setup.py build
$ sudo python setup.py install --prefix=/usr/local

To build, we need a C compiler such as GCC and the Python header files in the python-dev or python-devel package.

主站蜘蛛池模板: 益阳市| 灵丘县| 龙口市| 娄底市| 夏邑县| 大新县| 临澧县| 桓仁| 怀远县| 壤塘县| 库尔勒市| 大足县| 兴海县| 黎平县| 花莲市| 西乌| 栖霞市| 咸丰县| 建平县| 灵寿县| 高要市| 桦南县| 甘孜| 东至县| 萨嘎县| 常宁市| 钦州市| 垣曲县| 武清区| 同仁县| 黑水县| 桐柏县| 色达县| 会昌县| 平度市| 新蔡县| 克什克腾旗| 赣州市| 扎鲁特旗| 伊金霍洛旗| 内乡县|