installing numpy

Raymond L. Buvel levub137 at wi.rr.com
Tue May 9 20:52:33 EDT 2006


Robert Kern wrote:
> Gary Wessle wrote:
> 
>>"Raymond L. Buvel" <levub137 at wi.rr.com> writes:
> 
> 
>>>When installing from source on a Debian system, you want the installed
>>>package to wind up in /usr/local/lib/python2.x/site-packages (where x
>>>represents the version of Python you are running the installer from).
>>>This allows you to keep it separate from the apt managed directories and
>>>allows for easy removal/upgrade.  So the command you want to execute
>>
>>>from root is
>>
>>>python setup.py install --prefix=/usr/local
>>
>>sorry if this is boring since I am not a seasoned Linux user.
>>
>>setup.py isn't located at the root, do you mean, execute the command above
>>from root, as to do this
>>:~$ cd /
>>:/$ python setup.py install --prefix=/usr/local
>>or 
>>:/$ python home/fred/numpy-0.9.6/setup.py install --pref...
>>or AS root
>>:/# python setup.py install --prefix=/usr/local
>>or 
>>:/# python home/fred/numpy-0.9.6/setup.py install --pref...
> 
> 
> I think he meant "as the root user". You will probably want to build numpy as a
> regular user and then only install as the root user. You will probably want to
> use sudo(1) to gain root privileges. You can read the sudo man-page for more
> information on how to do that.
> 
> ~$ cd numpy-0.9.6
> ~/numpy-0.9.6$ python setup.py build
> ~/numpy-0.9.6$ sudo python setup.py install --prefix=/usr/local
> 
> However, instead of setting --prefix every time you execute setup.py for every
> Python package, it will be easier for you to create the file ~/.pydistutils.cfg
> with the contents
> 
> [install]
> prefix=/usr/local
> 
> See http://docs.python.org/inst/config-syntax.html for more information.
> 
> Then, you can just do
> 
> ~$ cd numpy-0.9.6
> ~/numpy-0.9.6$ python setup.py build
> ~/numpy-0.9.6$ sudo python setup.py install
> 
> 
>>>By the way, to get NymPy to use the high-performance libraries, you must
>>>install these libraries and the associated -dev packages before running
>>>the Python install.
>>
>>I wish to know the debian names for those packages, my first guess
>>would be refblas3 under testing since blas is not available for
>>debian/testing, there is also
>>refblas3-dev  Basic Linear Algebra Subroutines 3, static library 
>>which I don't have installed.
>>
>>would refblas3 be all what NymPy need to the high-performance?
> 
> 
> No. refblas3 provides the reference (unoptimized) implementation of the BLAS. In
> Ubuntu (a Debian-based distribution) the package that you would want is
> atlas3-base-dev. It should have a similar name in your version of Debian
> (possibly atlas-dev or atlas3-dev or some other variant).
> 
> If you need more help, you will probably get more focused help on the
> numpy-discussion mailing list.
> 
>   http://lists.sourceforge.net/lists/listinfo/numpy-discussion
> 

Since you are a new Linux user, you should definitely follow Robert's
advice about building as an ordinary user separately from the install.
I sometimes take a shortcut and just do the install as user root.
However, I then wind up cleaning out the build directory as user root
(not a very safe thing to do).

The Debian/testing package you want to install is indeed
atlas3-base-dev.  This package contains the header files needed to build
against the optimized blas library.  Note that the dependancies listed
in this package will cause the library package to be installed as well.

There are packages that are optimized for the extended instruction sets
available on some processors.  If you want to try and install one of
these instead of atlas3-base, just search the package list for anything
with atlas3 in the name.  Then carefully read the package descriptions
to find one that is optimized for your hardware.  Make sure you install
the -dev package or you will wind up using the unoptimized default in NumPy.



More information about the Python-list mailing list