1. NodeBox 1
    1. Homepage
    2. NodeBox 3Node-based app for generative design and data visualization
    3. NodeBox OpenGLHardware-accelerated cross-platform graphics library
    4. NodeBox 1Generate 2D visuals using Python code (Mac OS X only)
  2. Gallery
  3. Documentation
  4. Forum
  5. Blog

Difficulties installing coreimage library

Posted by Michael on Oct 30, 2007

Hello!

I have been having fun playing with NodeBox. Thanks for a great project!

I'm now looking at some of the libraries but have been having trouble installing the "coreimage" library. For example, running the single line script:

coreimage = ximport("coreimage")

I get the error:

Traceback (most recent call last):
File "nodebox/gui/mac/__init__.pyo", line 346, in _execScript
File "", line 1, in ?
File "nodebox/graphics/cocoa.pyo", line 1321, in ximport
ImportError: No module named coreimage

I'm running OS X 10.4.10.

Another bug I see with some of the install attempts is that a file called nodebox.graphics cannot be located.

Any ideas?

Thank you!


 
Posted by Michael on Oct 30, 2007

After posting I discovered that the import seems to go ok with:

coreimage = ximport("__init__")

Still, it would be helpful to know why the standard method doesn't work and what I can do to fix it.



Posted by anonymous on Oct 30, 2007

If you want to install a module, either put the folder in ~/Application Support/NodeBox/ (there it will be accesible from all scripts) or in the same directory as your project. If you have to import __init__, that means you are running your script from inside the library. This is usually not good practice. You see, Python only searches specific locations for a file named (module).py or a folder named (module). Since there is no coreimage.py inside the coreimage folder, it will say it can't find it. Python will not look up or down directories. Only in the library paths specified.