Numeric and BPython

I can’t for the life of me get Blender to import Numeric. Numeric fills several important holes in python and I could really use the module.

However despite my best effors, Blender refuses to see the package. I’ve got so far as to add a million things to the BPython search path before trying to import the module. I’ve printed out the search path, and Blender has the right location, but no luck:

Using Python version 2.4
['/usr/lib/python2.4/site-packages', '/usr/lib/', '/usr/lib/python2.4/', '/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk', '/usr/lib/python2.4/lib-dynload', '/usr/local/bin', '/home/sewall/.blender/scripts', '/home/sewall/.blender/scripts/bpymodules', '/home/sewall/lsystem', '/usr/python2.4/site-packages/Numeric']
Traceback (most recent call last):
  File "", line 14, in ?
    from hermite import *
  File "/home/sewall/lsystem/", line 1, in ?
    from Numeric import matrixmultiply, arange
ImportError: No module named Numeric

Ive got python 2.4 installed on my system and I’m using blender 2.40-alpha2 with python 2.4. Does anyone know what the problem might be?

Where is Numeric installed on your machine?

It’s in /usr/lib/python2.4/site-packages/Numeric. I’ve also added that to my PYTHONPATH to no avail.

it works for me - just by saying “import Numeric” in Blender. must be your pythonpath somehow. this is what print Numeric gives for me in Blender:

<module ‘Numeric’ from ‘/usr/lib/python2.4/site-packages/Numeric/Numeric.pyc’>

btw, i’ve been thinking that we should use those largely standard numerical and matrix etc. python types as much as possible … and also participate in the proposal about making Numeric3 part of the python core,

Recently Travis Oliphant has taken the time to go over numarray and has determined that Numeric can be enhanced to support the new features of numarray without losing small array support. Thus, Numeric3 has begun which aims to replace Numeric as the array object in SciPy. It’s more ambitious aim is to be included in the Python core. A design document has been posted and your comments are appreciated."

was a bit disappointed to see that cgkit (the python lib used with renderman tools) had again its own vector etc. types, but perhaps they could also to use some same standard than we at some point…


From your sys.path:

They don’t match.