473,320 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

installing numpy

Hi

I am trying to install NumPy in my debian/testing linux
2.6.15-1-686.

with no numpy for debian/testing, I am left alone, since the
experimental version available by debian will result in a dependency
nightmares,

so after unpacking the downloaded file "numpy-0.9.6.tar.gz"
which crated a directory in my home directory called numpy-0.9.6 with

************************************************** **************
-rw-r--r-- 1 fred fred 1537 2006-01-21 19:12 LICENSE.txt
-rw-r--r-- 1 fred fred 246 2006-01-22 12:44 MANIFEST.in
drwxr-xr-x 11 fred fred 4096 2006-05-08 20:06 numpy
-rw-r--r-- 1 fred fred 1472 2006-03-14 19:27 PKG-INFO
-rw-r--r-- 1 fred fred 476 2006-01-07 08:29 README.txt
-rw-r--r-- 1 fred fred 1164 2006-05-08 20:06 semantic.cache
-rwxr-xr-x 1 fred fred 2516 2006-03-13 18:02 setup.py
************************************************** **************

************************************************** **************
$cat README.txt
....
To install:

python setup.py install

The setup.py script will take advantage of fast BLAS on your system if
it can find it. You can help the process with a site.cfg file.

If fast BLAS and LAPACK cannot be found, then a slower default version
is used.
....
************************************************** **************

do I issue the command above "python setup.py install" from the
unpacked directory numpy-0.9.6, would it put the packages in the
correct places in my system, I was under the impression that a
numpy.py is unpacked and then I place it the sys.path but this is not
the case here.
thanks
May 10 '06 #1
13 3866
On Tue, May 09, 2006 at 09:03:31PM +1000, Gary Wessle wrote:
I am trying to install NumPy in my debian/testing linux
2.6.15-1-686.

with no numpy for debian/testing, I am left alone, since the
experimental version available by debian will result in a dependency
nightmares,


What about "python-numeric"? Found through "apt-cache search numpy".

Kindly
Christoph
--
Please reply to the list - not to me personally. Personal replies are ignored.
May 10 '06 #2
Christoph Haas <em***@christoph-haas.de> writes:
On Tue, May 09, 2006 at 09:03:31PM +1000, Gary Wessle wrote:
I am trying to install NumPy in my debian/testing linux
2.6.15-1-686.

with no numpy for debian/testing, I am left alone, since the
experimental version available by debian will result in a dependency
nightmares,


What about "python-numeric"? Found through "apt-cache search numpy".


is no longer maintained, notice my previous post titled "Numerical
Python Tutorial errors"

May 10 '06 #3
On Tue, May 09, 2006 at 09:43:50PM +1000, Gary Wessle wrote:
Christoph Haas <em***@christoph-haas.de> writes:
On Tue, May 09, 2006 at 09:03:31PM +1000, Gary Wessle wrote:
I am trying to install NumPy in my debian/testing linux
2.6.15-1-686.

with no numpy for debian/testing, I am left alone, since the
experimental version available by debian will result in a dependency
nightmares,


What about "python-numeric"? Found through "apt-cache search numpy".


is no longer maintained, notice my previous post titled "Numerical
Python Tutorial errors"


Are you sure? The last update of the Debian package was slightly over a
month ago (http://packages.qa.debian.org/p/python-numeric.html).

And the description text reads:
"""
Description: Numerical (matrix-oriented) Mathematics for Python
The Numeric Extensions to Python (NumPy) ...
"""

And finally the /usr/share/doc/python-numeric/copyright.Debian reads:
"It was downloaded from http://numpy.sourceforge.net/"

Kindly
Christoph

P.S.: Your mail client seems break the references. Your reply doesn't show
up as a proper followup to my posting.
--
Please reply to the list - not to me personally. Personal replies are ignored.
May 10 '06 #4
(Replying to my own posting... how I hate that...)

On Tue, May 09, 2006 at 02:07:15PM +0200, Christoph Haas wrote:
On Tue, May 09, 2006 at 09:43:50PM +1000, Gary Wessle wrote:
Christoph Haas <em***@christoph-haas.de> writes:
On Tue, May 09, 2006 at 09:03:31PM +1000, Gary Wessle wrote:
> I am trying to install NumPy in my debian/testing linux
> 2.6.15-1-686.
>
> with no numpy for debian/testing, I am left alone, since the
> experimental version available by debian will result in a dependency
> nightmares,

What about "python-numeric"? Found through "apt-cache search numpy".


is no longer maintained, notice my previous post titled "Numerical
Python Tutorial errors"


Are you sure? The last update of the Debian package was slightly over a
month ago (http://packages.qa.debian.org/p/python-numeric.html).


Yes, you are right. "python-numeric" refers to NumPy but contains the
"Numeric" version of it (24-2). It's pretty misleading.

I'll ask the package maintainer about the status of python-numpy in Debian
and hopefully come back with news.

Kindly
Christoph
--
Please reply to the list - not to me personally. Personal replies are ignored.
May 10 '06 #5
Gary Wessle wrote:
Hi

I am trying to install NumPy in my debian/testing linux
2.6.15-1-686.

<snip>

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

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.
May 10 '06 #6
Christoph Haas wrote:
P.S.: Your mail client seems break the references. Your reply doesn't show
up as a proper followup to my posting.


This probably has nothing to do with his mail/news client but rather the
mail-news gateway that links python-list and comp.lang.python .

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco

May 10 '06 #7
Christoph Haas wrote:
Yes, you are right. "python-numeric" refers to NumPy but contains the
"Numeric" version of it (24-2). It's pretty misleading.


It's an unfortunate consequence of letting software packages acquire nicknames.
C.f.:

http://www.scipy.net/pipermail/scipy...ay/007847.html

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco

May 10 '06 #8
"Raymond L. Buvel" <le******@wi.rr.com> writes:
Gary Wessle wrote:
Hi

I am trying to install NumPy in my debian/testing linux
2.6.15-1-686.
<snip>

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...


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?

thanks
May 10 '06 #9
Gary Wessle wrote:
"Raymond L. Buvel" <le******@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/l...mpy-discussion

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco

May 10 '06 #10
Robert Kern <ro*********@gmail.com> writes:
Raymond L. Buvel wrote:
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).


For small, pure Python packages, that may be fine. numpy's build is complicated
enough that you really, *really* want to build as a regular user.

--
Robert Kern


I have read as much as I can form the python installation manual.
as a regular user, I created a personal configuration file here

****************
:~$ cat .pydistutils.cfg
[install]
prefix=/usr/local
****************

now to build as a regular user, I am getting some errors

************************************************** **************
$ cd numpy-0.9.6
$ python setup.py build
Running from numpy source directory.
Warning: not existing path in numpy/distutils: site.cfg
F2PY Version 2_2236
Traceback (most recent call last):
File "setup.py", line 76, in ?
setup_package()
File "setup.py", line 63, in setup_package
config.add_subpackage('numpy')
File "/home/fred/numpy-0.9.6/numpy/distutils/misc_util.py", line 592, in add_s ubpackage
config_list = self.get_subpackage(subpackage_name,subpackage_pat h)
File "/home/fred/numpy-0.9.6/numpy/distutils/misc_util.py", line 582, in get_s ubpackage
subpackage_path)
File "/home/fred/numpy-0.9.6/numpy/distutils/misc_util.py", line 539, in _get_ configuration_from_setup_py
config = setup_module.configuration(*args)
File "/home/fred/numpy-0.9.6/numpy/setup.py", line 10, in configuration
config.add_subpackage('core')
File "/home/fred/numpy-0.9.6/numpy/distutils/misc_util.py", line 592, in add_s ubpackage
config_list = self.get_subpackage(subpackage_name,subpackage_pat h)
File "/home/fred/numpy-0.9.6/numpy/distutils/misc_util.py", line 582, in get_s ubpackage
subpackage_path)
File "/home/fred/numpy-0.9.6/numpy/distutils/misc_util.py", line 539, in _get_ configuration_from_setup_py
config = setup_module.configuration(*args)
File "numpy/core/setup.py", line 11, in configuration
from numpy.distutils.system_info import get_info, default_lib_dirs
File "/home/fred/numpy-0.9.6/numpy/distutils/system_info.py", line 151, in ?
so_ext = get_config_vars('SO')[0] or ''
File "/usr/lib/python2.4/distutils/sysconfig.py", line 488, in get_config_vars
func()
File "/usr/lib/python2.4/distutils/sysconfig.py", line 358, in _init_posix
raise DistutilsPlatformError(my_msg)
distutils.errors.DistutilsPlatformError: invalid Python installation: unable to open /usr/lib/python2.4/config/Makefile (No such file or directory)
May 10 '06 #11
Gary Wessle wrote:
Robert Kern <ro*********@gmail.com> writes:

Raymond L. Buvel wrote:

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).


For small, pure Python packages, that may be fine. numpy's build is complicated
enough that you really, *really* want to build as a regular user.

--
Robert Kern

I have read as much as I can form the python installation manual.
as a regular user, I created a personal configuration file here

****************
:~$ cat .pydistutils.cfg
[install]
prefix=/usr/local
****************

now to build as a regular user, I am getting some errors

************************************************** **************
$ cd numpy-0.9.6
$ python setup.py build
Running from numpy source directory.
Warning: not existing path in numpy/distutils: site.cfg
F2PY Version 2_2236
Traceback (most recent call last):
File "setup.py", line 76, in ?
setup_package()
File "setup.py", line 63, in setup_package
config.add_subpackage('numpy')
File "/home/fred/numpy-0.9.6/numpy/distutils/misc_util.py", line 592, in add_s ubpackage
config_list = self.get_subpackage(subpackage_name,subpackage_pat h)
File "/home/fred/numpy-0.9.6/numpy/distutils/misc_util.py", line 582, in get_s ubpackage
subpackage_path)
File "/home/fred/numpy-0.9.6/numpy/distutils/misc_util.py", line 539, in _get_ configuration_from_setup_py
config = setup_module.configuration(*args)
File "/home/fred/numpy-0.9.6/numpy/setup.py", line 10, in configuration
config.add_subpackage('core')
File "/home/fred/numpy-0.9.6/numpy/distutils/misc_util.py", line 592, in add_s ubpackage
config_list = self.get_subpackage(subpackage_name,subpackage_pat h)
File "/home/fred/numpy-0.9.6/numpy/distutils/misc_util.py", line 582, in get_s ubpackage
subpackage_path)
File "/home/fred/numpy-0.9.6/numpy/distutils/misc_util.py", line 539, in _get_ configuration_from_setup_py
config = setup_module.configuration(*args)
File "numpy/core/setup.py", line 11, in configuration
from numpy.distutils.system_info import get_info, default_lib_dirs
File "/home/fred/numpy-0.9.6/numpy/distutils/system_info.py", line 151, in ?
so_ext = get_config_vars('SO')[0] or ''
File "/usr/lib/python2.4/distutils/sysconfig.py", line 488, in get_config_vars
func()
File "/usr/lib/python2.4/distutils/sysconfig.py", line 358, in _init_posix
raise DistutilsPlatformError(my_msg)
distutils.errors.DistutilsPlatformError: invalid Python installation: unable to open /usr/lib/python2.4/config/Makefile (No such file or directory)


I think this is another example where you don't have the -dev package
you need installed on your system. In order to build just about
anything that requires header files on a Debian system, you need to
install the -dev packages. Debian usually packages things into a
package for regular users and another package of the same name with a
-dev suffix for developers. In this case, it looks like distutils is
complaining about a missing Makefile. But this is just the start of the
problems. Checking on my system, it looks like you need to install the
python2.4-dev package. Note that installing python-dev won't work in
your case since that is for the default Python which is still Python2.3
in Debian testing.

Using NumPy as your first introduction to building Python extension
modules is a real challenge.

Good luck!
Ray Buvel
May 10 '06 #12

thanks
I followed your suggestions, it built the package ok, while it was
building, I noticed lots of lines going by the screen in groups of
different colors, white, yellow, red.
the red got my attention:

****************
Could not locate executable gfortran
Could not locate executable f95
****************

is there a way to find out if the built is fine and it is using the
high performance libraries?

thanks
May 10 '06 #13
Gary Wessle wrote:
thanks
I followed your suggestions, it built the package ok, while it was
building, I noticed lots of lines going by the screen in groups of
different colors, white, yellow, red.
the red got my attention:

****************
Could not locate executable gfortran
Could not locate executable f95
****************
Don't worry about those. numpy does not require a Fortran compiler to build.
Some projects using numpy.distutils, like scipy, will. The information flow in
distutils is not ideal, so the checks are done regardless of whether you need
Fortran or not.
is there a way to find out if the built is fine and it is using the
high performance libraries?


You can use the ldd(1) program on the extension modules (they're the ones with
the .so extension) to see what libraries they link against.

To run all of the unit tests:

[~]$ python
Python 2.4.1 (#2, Mar 31 2005, 00:05:10)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
import numpy
numpy.test() Found 5 tests for numpy.distutils.misc_util
Found 3 tests for numpy.lib.getlimits
Found 30 tests for numpy.core.numerictypes
Found 13 tests for numpy.core.umath
Found 8 tests for numpy.lib.arraysetops
Found 42 tests for numpy.lib.type_check
Found 93 tests for numpy.core.multiarray
Found 3 tests for numpy.dft.helper
Found 36 tests for numpy.core.ma
Found 9 tests for numpy.lib.twodim_base
Found 2 tests for numpy.core.oldnumeric
Found 8 tests for numpy.core.defmatrix
Found 1 tests for numpy.lib.ufunclike
Found 34 tests for numpy.lib.function_base
Found 1 tests for numpy.lib.polynomial
Found 6 tests for numpy.core.records
Found 19 tests for numpy.core.numeric
Found 4 tests for numpy.lib.index_tricks
Found 46 tests for numpy.lib.shape_base
Found 0 tests for __main__
.................................................. .................................................. .................................................. .................................................. .................................................. .................................................. .................................................. ..............
----------------------------------------------------------------------
Ran 363 tests in 2.812s

OK
<unittest.TextTestRunner object at 0x15a2f50>


--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco

May 10 '06 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Steven Gutstein | last post by:
This is probably a fairly newbie type problem, but I'm trying to use PyOpenGL, and don't seem to have installed it correctly. I'm running Python 2.3 on a Windows NT machine. Whenever I go into...
1
by: cesco | last post by:
Hi, I'm trying to install the numpy library (precisely numpy-0.9.6-py2.4-linux-i686) on Linux but I encounter several problems. After unpacking the file it creates the following folders:...
1
by: Ken Dere | last post by:
I am trying to install numpy-0.9.8 prior to installing scipy (0.4.9) on a machine running Suse 10.0 with Python 2.4 I am able to get numpy installed to the point when I import it I can do the...
2
by: Chris Smith | last post by:
Howdy, I'm a college student and for one of we are writing programs to numerically compute the parameters of antenna arrays. I decided to use Python to code up my programs. Up to now I haven't...
5
by: robert | last post by:
Turning algs for old NumPy modules into numpy code I suffer from this: Upon further processing of returns of numpy calculations, lots of data in an apps object tree will become elementary numpy...
1
by: 1960_j | last post by:
I have tried to install numpy and scipy on python 5.2. Using gcc 2.95.3, lapack 3.1.1 and ATLAS 3.6.0. When installin numpy it seems to work but when I try to run test get error no test for numpy....
0
by: jack69 | last post by:
Hi, I'm having troubles installing NumPy on an AMD machine that runs 32-bit Vista. During the install NumPy complains that it cannot find Python 2.5 in the registry. Other packages have no...
3
by: chapagainanish | last post by:
Hi!! I'm having installation problem for installing numpy and scipy in Cygwin for Python, and am obstruct in madway for project, i followed scipy.org guidelines but there's few error thrown as...
2
by: Travis Oliphant | last post by:
I wanted to point anybody interested to a blog post that describes a useful pattern for having a NumPy array that points to the memory created by a different memory manager than the standard one...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.