Try something new. NodeBox 2 Beta - Now Available for Download

Troubles importing external libraries

Posted by Dave on May 08, 2010

Hello all!
I'm having issue trying to import into the Nodebox environment some external libraries I'd like to use, especially the nice python-twitter library. I successfully installed the lib, and I have it perfectly working from the python shell. But from Nodebox I keep on getting the error "ImportError: No module named twitter". I've tried to import the library using

ximport("twitter")
or python-style
import twitter
, without any luck in both cases.
I'm using Nodebox under Snow Leopard 10.6.3.
Can you give me a hint?

Thanks!


 
Posted by Sebastian Oliva on May 10, 2010

Hello, I had the same problem, and there is a really easy fix,
just execute

mkdir /Applications/NodeBox/NodeBox.app/Contents/Resources/Python
ln -s /Library/Python/2.5/site-packages /Applications/NodeBox/NodeBox.app/Contents/Resources/Python
in your terminal
to create a link from your Mac's Python Packages to Nodebox Libs, then you'll have access to all your Python libs on Nodebox.



Add comment