[PYTHON MATRIX-SIG] Strange problem importing Numeric

Konrad Hinsen hinsen@ibs.ibs.fr
Thu, 23 Jan 1997 19:58:59 +0100


> Note the strange path it uses when it tries to map libnumpymodule.so, and
> what sys.path says. Similar things happen if I first import ni.

You can avoid all problems related to libnumpy by using the first
installation method (i.e. in the Python source code tree).

> (I just realized I have to change the default path, though, to also add
> /usr/local/lib/python1.4/NumPy, since to get this to go this far I had to
> copy those files directly into Lib. I'm not sure how to go about this,
> though...) 

Without recompiling the interpreter, all you can do is to add
the directory to PYTHONPATH. If you do use the other installation
method, you can modify the default path by changing Modules/Setup.
Change the line 

COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH)$(MACHDEPPATH)$(STDWINPATH)$(TKPATH)

to

COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH)$(MACHDEPPATH)$(STDWINPATH)$(TKPATH)$(NUMPYPATH)

and add the line

NUMPYPATH=:$(DESTLIB)/NumPy

anywhere below (most reasonably close to the NumPy module definitions).

-- 
-------------------------------------------------------------------------------
Konrad Hinsen                          | E-Mail: hinsen@ibs.ibs.fr
Laboratoire de Dynamique Moleculaire   | Tel.: +33-4.76.88.99.28
Institut de Biologie Structurale       | Fax:  +33-4.76.88.54.94
41, av. des Martyrs                    | Deutsch/Esperanto/English/
38027 Grenoble Cedex 1, France         | Nederlands/Francais
-------------------------------------------------------------------------------

_______________
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
_______________