Book Image

Learning NumPy Array

By : Ivan Idris
Book Image

Learning NumPy Array

By: Ivan Idris

Overview of this book

Table of Contents (14 chapters)
Learning NumPy Array
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Building 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, 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 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

Install on /usr/local with the following command:

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.