Installing NumPy-1.0a5 
Author Message
 Installing NumPy-1.0a5

Hi-

I am trying to install NumPy-1.0a5.  It seems to install correctly,
but when I try to use it this is what happens:

Python 1.4 (Nov 14 1996) [C]
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam

Quote:
>>> from Numeric import *

Traceback (innermost last):
  File "<stdin>", line 1, in ?
ImportError: No module named Numeric

Any ideas of what might be the problem?

Thanks in advance!
-Susan

--
Susan Peterson



Sun, 09 May 1999 03:00:00 GMT  
 Installing NumPy-1.0a5

Hi Susan,

        Hmmm.. I saw the response about 'ni' but I couldn't
get that to work. I did a couple of things that helped me...
but I'm not sure if they were the best way to handle it.
First I wanted '/usr/local/lib/python1.4/Numeric' to be on
the defaulr path, so I went into the Modules/Setup file and
added it:

------
NUMERICPATH=:$(DESTLIB)/Numeric

COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH)$(MACHDEPPATH)$(NUMERICPATH)
---------

(I don't use Tk or Stdwin so I also took those out...)

Then I needed the python source files from Lib/Numeric copied to the
destination lib dir so I changed the following in the main
Makefile.in:

LIBSUBDIRS=     stdwin tkinter test $(MACHDEPS) Numeric

hope that helps!

-steve

    Susan> Hi- I am trying to install NumPy-1.0a5.  It seems to
    Susan> install correctly, but when I try to use it this is what
    Susan> happens:

    Susan> Python 1.4 (Nov 14 1996) [C] Copyright 1991-1995 Stichting
    Susan> Mathematisch Centrum, Amsterdam
    >>>> from Numeric import *
    Susan> Traceback (innermost last): File "<stdin>", line 1, in ?
    Susan> ImportError: No module named Numeric

    Susan> Any ideas of what might be the problem?  Please send reply

    Susan> Thanks in advance!  -Susan

    Susan> -- Susan Peterson



Mon, 10 May 1999 03:00:00 GMT  
 Installing NumPy-1.0a5

I am coming in on the tail end of this thread with the same problem.
I installed NumPy according to directions.  I end up with a Numeric
directory in /usr/local/lib/python1.4  To be on the safe side, I even
added /usr/local/lib/python1.4 to PYTHONPATH.  
I get the following
# ./python -c 'from Numeric import *'
Traceback (innermost last):
  File "<string>", line 1, in ?
ImportError: No module named Numeric

The only snippet of documentation (there needs to be more!) that I
could  find describing module configuration is section 2.2.2 "The Module
Search Path" in the Python tutorial.  It says that the satatement
import Numeric
tells the interpreter to look for a file called Numeric.py
If that is true, then no wonder it complains.  There is a directory
called Numeric, but no file Numeric.py.

So, please, how is one supposed to use the Numeric module?
Is Python supposed to be happy with a directory?  If so, why isn't
my version of Python (1.4)?  If not, what does
import Numeric.LinearAlgebra
mean?  Will it want a file called Numeric.LinearAlgebra.py
or Numeric/LinearAlgebra.py?


Thanks,
Michael Altmann

Quote:

> Hi Susan,

>         Hmmm.. I saw the response about 'ni' but I couldn't
> get that to work. I did a couple of things that helped me...
> but I'm not sure if they were the best way to handle it.
> First I wanted '/usr/local/lib/python1.4/Numeric' to be on
> the defaulr path, so I went into the Modules/Setup file and
> added it:

> ------
> NUMERICPATH=:$(DESTLIB)/Numeric

> COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH)$(MACHDEPPATH)$(NUMERICPATH)
> ---------

> (I don't use Tk or Stdwin so I also took those out...)

> Then I needed the Python source files from Lib/Numeric copied to the
> destination lib dir so I changed the following in the main
> Makefile.in:

> LIBSUBDIRS=     stdwin tkinter test $(MACHDEPS) Numeric

> hope that helps!

> -steve


>     Susan> Hi- I am trying to install NumPy-1.0a5.  It seems to
>     Susan> install correctly, but when I try to use it this is what
>     Susan> happens:

>     Susan> Python 1.4 (Nov 14 1996) [C] Copyright 1991-1995 Stichting
>     Susan> Mathematisch Centrum, Amsterdam
>     >>>> from Numeric import *
>     Susan> Traceback (innermost last): File "<stdin>", line 1, in ?
>     Susan> ImportError: No module named Numeric

>     Susan> Any ideas of what might be the problem?  Please send reply

>     Susan> Thanks in advance!  -Susan

>     Susan> -- Susan Peterson



Sat, 15 May 1999 03:00:00 GMT  
 Installing NumPy-1.0a5

    Michael> I am coming in on the tail end of this thread with the
    Michael> same problem.  I installed NumPy according to directions.
    Michael> I end up with a Numeric directory in
    Michael> /usr/local/lib/python1.4 To be on the safe side, I even
    Michael> added /usr/local/lib/python1.4 to PYTHONPATH.  I get the
    Michael> following # ./python -c 'from Numeric import *' Traceback
    Michael> (innermost last): File "<string>", line 1, in ?
    Michael> ImportError: No module named Numeric

/usr/local/lib/python1.4/Numeric

needs to be on PYTHONPATH as well. Make sure that Numeric has

  -rwxr-xr-x  1 root        5739 Nov 22 05:40 ArrayPrinter.py
  -rw-r--r--  1 root        7848 Nov 22 05:40 ArrayPrinter.pyc
  -rwxr-xr-x  1 root        1844 Nov 22 05:40 FFT.py
  -rw-r--r--  1 root        3693 Nov 22 05:40 FFT.pyc
  -rwxr-xr-x  1 root        9895 Nov 22 05:40 LinearAlgebra.py
  -rw-r--r--  1 root       11238 Nov 22 05:40 LinearAlgebra.pyc
  -rwxr-xr-x  1 root        3854 Nov 22 05:40 MLab.py
  -rw-r--r--  1 root        7502 Nov 22 05:40 MLab.pyc
  -rwxr-xr-x  1 root         496 Nov 22 05:40 Matrix.py
  -rw-r--r--  1 root        1235 Nov 22 05:40 Matrix.pyc
  -rwxr-xr-x  1 root        7266 Nov 22 05:40 Numeric.py
  -rw-r--r--  1 root       12393 Nov 22 05:40 Numeric.pyc
  -rwxr-xr-x  1 root        2422 Nov 22 05:40 Precision.py
  -rw-r--r--  1 root        3072 Nov 22 05:40 Precision.pyc
  -rwxr-xr-x  1 root         964 Nov 22 05:40 RandomArray.py
  -rw-r--r--  1 root        2255 Nov 22 05:40 RandomArray.pyc
  -rwxr-xr-x  1 root        4967 Nov 22 05:40 UserArray.py
  -rw-r--r--  1 root       11903 Nov 22 05:40 UserArray.pyc



Sat, 15 May 1999 03:00:00 GMT  
 Installing NumPy-1.0a5

MA> I am coming in on the tail end of this thread with the same problem.
MA> I installed NumPy according to directions.  I end up with a Numeric
MA> directory in /usr/local/lib/python1.4  To be on the safe side, I even
MA> added /usr/local/lib/python1.4 to PYTHONPATH.  
MA> I get the following
MA> # ./python -c 'from Numeric import *'
MA> Traceback (innermost last):
MA>   File "<string>", line 1, in ?
MA> ImportError: No module named Numeric

MA> The only snippet of documentation (there needs to be more!) that I
MA> could  find describing module configuration is section 2.2.2 "The Module
MA> Search Path" in the Python tutorial.  It says that the satatement
MA> import Numeric
MA> tells the interpreter to look for a file called Numeric.py
MA> If that is true, then no wonder it complains.  There is a directory
MA> called Numeric, but no file Numeric.py.

There is a NumPy/Numeric/Numeric.py. Just copy all the .py files to
/usr/local/lib/python1.4 or add /usr/local/lib/python1.4/Numeric to your
python path.

--

URL: http://www.cs.ruu.nl/~piet [PGP]



Sat, 15 May 1999 03:00:00 GMT  
 Installing NumPy-1.0a5

Quote:

> Here is what I have found out about installing NumPy.

> The  page
> http://www.python.org/python/Projects.html
> points you to an old NumPy repository where the newest version
> is NumPy1.0a4, which happens to be missing Numeric.py.

> The right site for getting NumPy is
> http://www.sls.lcs.mit.edu/~jjh/numpy/download.html
> [...]

Sorry to have let the Projects.html link go stale - i've revised it.


            (orporation for National Research |nitiatives

        # If you appreciate Python, consider joining the PSA! #
                  # <http://www.python.org/psa/>. #



Sat, 15 May 1999 03:00:00 GMT  
 Installing NumPy-1.0a5

Here is what I have found out about installing NumPy.

The  page
http://www.python.org/python/Projects.html
points you to an old NumPy repository where the newest version
is NumPy1.0a4, which happens to be missing Numeric.py.

The right site for getting NumPy is
http://www.sls.lcs.mit.edu/~jjh/numpy/download.html

There is no documentation that I could find about how to add
a new directory to the builtin modules search path.  I made some
changes to the main Makefile and
one of those changes seems to have done the trick.

NumPy/arrayobject.c used the old Py_Ellipses instead of Py_Ellipsis
so I changed that.

I have now built python1.4 with NumPy1.0a5 and Python
can find the module.  

Thanks for the fast help from various folks.

--
Michael Altmann

625-9938

858-1724



Sat, 15 May 1999 03:00:00 GMT  
 Installing NumPy-1.0a5

Even from this distribution, I get the same error.
Note that I had installed NumPy without problems with
1.4beta3, now I have installed the final 1.4 and it
works fine, except for this:


sed -n \
  -e '1s/.*/1i\\/p' \
  -e '2s%.*%# Generated automatically from Makefile.pre.in by
sedscript.%p' \










  -e '/^LINKFORSHARED=/s/^LINKFORSHARED=[      

  -e '/^prefix=/s/^prefix=\(.*\)/s%^prefix=.*%prefix=\1%/p' \
  -e
'/^exec_prefix=/s/^exec_prefix=\(.*\)/s%^exec_prefix=.*%exec_prefix=\1%/p'
\
  /usr/local/lib/python1.4/config/Makefile >sedscript
( \
          echo "/^installdir=/s%=.*%=   /usr/local%"; \
          echo "/^exec_installdir=/s%=.*%=/usr/local%"; \
          echo "/^srcdir=/s%=.*%=               .%"; \
          echo "/^VPATH=/s%=.*%=                .%"; \
          echo "/^LINKPATH=/s%=.*%=     %"; \
          echo "/^OPT=/s%=.*%=          -O4%"; \
          echo "/^BASELIB=/s%=.*%=      %"; \
          echo "/^BASESETUP=/s%=.*%=    %"; \
        ) >>sedscript
sed -f sedscript ./Makefile.pre.in >Makefile.pre
/usr/local/lib/python1.4/config/makesetup \
         -m Makefile.pre -c /usr/local/lib/python1.4/config/config.c.in
Setup -n  /usr/local/lib/python1.4/config/Setup
make -f Makefile do-it-again
make[1]: Entering directory `/usr/people/protopap/download/NumPy'
/usr/local/lib/python1.4/config/makesetup \
         -m Makefile.pre -c /usr/local/lib/python1.4/config/config.c.in
Setup -n  /usr/local/lib/python1.4/config/Setup
make[1]: Leaving directory `/usr/people/protopap/download/NumPy'

gcc  -O4 -I/usr/local/include/python1.4
-I/usr/local/lib/python1.4/config -DHAVE_CONFIG_H  -I./Include -c
./arrayobject.c
./arrayobject.c: In function `parse_subindex':
./arrayobject.c:591: `Py_Ellipses' undeclared (first use this function)
./arrayobject.c:591: (Each undeclared identifier is reported only once
./arrayobject.c:591: for each function it appears in.)
./arrayobject.c: In function `parse_index':
./arrayobject.c:629: `Py_Ellipses' undeclared (first use this function)
make: *** [arrayobject.o] Error 1

This might be helpful:



arrayobject.c:  if (op == Py_Ellipses) {
arrayobject.c:  if (PySlice_Check(op) || op == Py_Ellipses) {

Obviously, something is missing. Where is it?

Thanassi Protopapas

Quote:


> > Here is what I have found out about installing NumPy.

> > The  page
> > http://www.python.org/python/Projects.html
> > points you to an old NumPy repository where the newest version
> > is NumPy1.0a4, which happens to be missing Numeric.py.

> > The right site for getting NumPy is
> > http://www.sls.lcs.mit.edu/~jjh/numpy/download.html
> > [...]

> Sorry to have let the Projects.html link go stale - i've revised it.


>             (orporation for National Research |nitiatives

>         # If you appreciate Python, consider joining the PSA! #
>                   # <http://www.python.org/psa/>. #



Mon, 24 May 1999 03:00:00 GMT  
 Installing NumPy-1.0a5

Quote:
> Even from this distribution, I get the same error.
> Note that I had installed NumPy without problems with
> 1.4beta3, now I have installed the final 1.4 and it
> works fine, except for this:

Between 1.4b3 and 1.4f, a typo was fixed: PyEllipses was fixed to be the
correct PyEllipsis.  Changing Ellipses to Ellipsis in the NumPy 1.0a5
distribution will make it work fine w/ python-1.4.

--da



Tue, 25 May 1999 03:00:00 GMT  
 Installing NumPy-1.0a5

TP> Even from this distribution, I get the same error.
TP> Note that I had installed NumPy without problems with
TP> 1.4beta3, now I have installed the final 1.4 and it
TP> works fine, except for this:

TP> ./arrayobject.c
TP> ./arrayobject.c: In function `parse_subindex':
TP> ./arrayobject.c:591: `Py_Ellipses' undeclared (first use this function)
TP> ./arrayobject.c:591: (Each undeclared identifier is reported only once
TP> ./arrayobject.c:591: for each function it appears in.)
TP> ./arrayobject.c: In function `parse_index':
TP> ./arrayobject.c:629: `Py_Ellipses' undeclared (first use this function)
TP> make: *** [arrayobject.o] Error 1

Between 1.4beta3 and 1.4 the name Ellipses was changed to Ellipsis. So
change the Py_Ellipses to Py_Ellipsis.
--

URL: http://www.cs.ruu.nl/~piet [PGP]



Tue, 25 May 1999 03:00:00 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. Installing NumPy on NT4

2. newbie needs help installing NumPy, reference material.

3. How to installing NumPy?

4. Numpy Won't install??

5. Can't get NumPy to Install

6. Installing numpy

7. Trouble installing numpy - newbie

8. installing numpy

9. how to install numpy on win nt ?

10. Installing NumPy in a non-standard place...

11. Problem installing NumPy

12. NumPy Install RedHat 4.1 Linux 2.0.27

 

 
Powered by phpBB® Forum Software