(WORKAROUND) PyFPE_jbuf and numpy home site-packages

OK, I have this issue which is getting on my nerves a bit :). I think it’s because of slightly different python versions. So my Ubuntu 15.10 comes with Python3.5.0 and blender 2.77 with Python3.5.1. There’s no option to update the system Python to 3.5.1 (yet). When trying to run blender, an addon complains:


connect failed: No such file or directory
Read new prefs: /home/razvan/.config/blender/2.77/config/userpref.blend
found bundled python: /home/razvan/.local/apps/blender/2.77/python
Traceback (most recent call last):
  File "/home/razvan/.local/apps/blender/2.77/scripts/modules/addon_utils.py", line 330, in enable
    mod = __import__(module_name)
  File "/home/razvan/.config/blender/2.77/scripts/addons/animation_nodes-master/__init__.py", line 39, in <module>
    modules = developer_utils.setup_addon_modules(__path__, __name__, "bpy" in locals())
  File "/home/razvan/.config/blender/2.77/scripts/addons/animation_nodes-master/developer_utils.py", line 35, in setup_addon_modules
    modules = import_submodules(names)
  File "/home/razvan/.config/blender/2.77/scripts/addons/animation_nodes-master/developer_utils.py", line 27, in import_submodules
    modules.append(importlib.import_module("." + name, package_name))
  File "/home/razvan/.local/apps/blender/2.77/python/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/home/razvan/.config/blender/2.77/scripts/addons/animation_nodes-master/algorithms/mesh_generation/from_splines.py", line 1, in <module>
    from ... data_structures.splines.bezier_spline import BezierSpline
  File "/home/razvan/.config/blender/2.77/scripts/addons/animation_nodes-master/data_structures/splines/bezier_spline.py", line 1, in <module>
    import numpy
  File "/home/razvan/.local/lib/python3.5/site-packages/numpy/__init__.py", line 201, in <module>
    from . import random
  File "/home/razvan/.local/lib/python3.5/site-packages/numpy/random/__init__.py", line 99, in <module>
    from .mtrand import *
ImportError: /home/razvan/.local/lib/python3.5/site-packages/numpy/random/mtrand.cpython-35m-x86_64-linux-gnu.so: undefined symbol: PyFPE_jbuf

I saw that blender comes with it’s own numpy package, yet it is picking up the numpy package I have installed in my home directory. I did some tests and running python3.5m -s -c "import numpy" (the one that comes with blender) correctly runs, but if I don’t use the -s option then it complains. That’s because the user site-packages folder is added “before” the blender’s own site-packages. Anyone have any ideas how I can force blender to not look inside my home site-packages or how else I can fix this? Thanks

OK, if anyone else might have this problem - which is highly improbable :slight_smile: - I use a workaround. Just run:


PYTHONPATH=PATH_TO_BLENDER/2.77/python/lib/python3.5/site-packages blender

On linux and actually want to use a *.desktop file you can modify the ‘Exec=…’ line like so:


Exec=env PATH_TO_BLENDER/2.77/python/lib/python3.5/site-packages blender %f

(I just kept the %f as in the default blender.desktop file). Enjoy your animation nodes add-on now or any other add-on dependent on numpy… that is if you had this problem :slight_smile: