Another NumPy issue

Hi all,

I’m trying to get numpy to import in Blender but am having issues. I’m using 2.69 on a Mac (OX 10.9.1). Depending on where I put numpy I get a different error.

If I install via macports and then try to append my path with sys.path.append to point to the correct directory where macports installs things, I get one of these:

ImportError: Error importing numpy: you should not try to import numpy from its source directory; please exit the numpy source tree, and relaunch
your python intepreter from there.

If I copy numpy from its site-packages location to scripts/addons, I get one of these:

raceback (most recent call last):
File “<blender_console>”, line 1, in <module>
File “/Applications/Blender/blender.app/Contents/MacOS/2.69/scripts/addons/numpy/init.py”, line 153, in <module>
from . import add_newdocs
ImportError: cannot import name add_newdocs

Any help figuring this out would be most appreciated!

did it work before or not?

might need a special built to install it in blender

happy bl

Try scripts/modules instead; numpy isn’t itself a Blender addon.

Traceback (most recent call last):
File “<blender_console>”, line 1, in <module>
File “/Applications/Blender/blender.app/Contents/MacOS/2.69/scripts/addons/numpy/init.py”, line 153, in <module>
from . import add_newdocs
ImportError: cannot import name add_newdocs

Your numpy folder should include the file 'add_newdocs.py"; the error message suggests that it is missing for some reason.

Make sure that the version of numpy you are using has been built with and for Python 3.3 (not 2.7, not even 3.2), since that is what is used in Blender 2.69.

Best wishes,
Matthew

FYI, in case other folks have issues, I solved this by building Blender (2.70) with cmake and putting a link to my numpy installation by hand. Thanks for the suggestions all!