0
$\begingroup$

I have installed blender on three Ubuntu machines using the following commands:

sudo add-apt-repository ppa:thomas-schiex/blender
sudo apt-get update && sudo apt-get install blender

according to this (http://ubuntuhandbook.org/index.php/2016/10/install-blender-2-78-in-ubuntu-16-04-14-04/)

Note that these are networked machines that I only have command line access to. Two of them work perfectly and one raises the following error when trying to import numpy in a blender script:

  File "/usr/lib/python3/dist-packages/numpy/core/__init__.py", line 6, in <module>
from . import multiarray
ImportError: cannot import name 'multiarray'

To diagnose this I have printed the sys.path of blender python on the machines that work, and get this:

>>> for p in sys.path:
...     print(p)
/usr/lib/blender/2.79/scripts/addons_contrib
/usr/lib/blender/2.79/scripts/addons
/usr/lib/blender/2.79/scripts/startup
/usr/lib/blender/2.79/scripts/modules
/usr/lib/blender/2.79/python/lib/python35.zip
/usr/lib/blender/2.79/python/lib/python3.5
/usr/lib/blender/2.79/python/lib/python3.5/plat-linux
/usr/lib/blender/2.79/python/lib/python3.5/lib-dynload
/usr/lib/blender/2.79/python/lib/python3.5/site-packages
/usr/lib/blender/2.79/scripts/freestyle/modules
/usr/lib/blender/2.79/scripts/addons/modules

On the machine that is failing to import numpy, the blender python sys.path is:

>>> for p in sys.path:
...     print(p)
/usr/share/blender/2.79/scripts/addons_contrib
/usr/share/blender/2.79/scripts/addons
/usr/share/blender/2.79/scripts/startup
/usr/share/blender/2.79/scripts/modules
/usr/lib/python36.zip
/usr/lib/python3.6
/usr/lib/python3.6/lib-dynload
/usr/lib/python3/dist-packages
/usr/share/blender/2.79/scripts/freestyle/modules
/usr/share/blender/2.79/scripts/addons/modules

So, for some reason, when I install blender, on this machine, it is using an external python3.6, when it should be using the python3.5 that is packaged with blender. Note that I can't even find a python directory in the installed blender. I have uninstalled, and reinstalled, My python path is unset. How can I diagnose and fix the blender installation on this machine?

$\endgroup$
1
$\begingroup$

We can't support unofficial builds, as there are too many of them with too many unknowns. If you really want to use this PPA, ask the person who created it for help. If you just want to use Blender on Ubuntu, download the Linux version from the Blender download page.

$\endgroup$
  • $\begingroup$ The problem is that this is a networked machine, that I only have command line access too. (I will add that to the question) $\endgroup$ – Philip Bayer Mar 12 '18 at 15:58
  • $\begingroup$ That doesn't change the fact that you're using an unofficial build of Blender. $\endgroup$ – dr. Sybren Mar 12 '18 at 16:43
  • $\begingroup$ To clarify, I meant how can I install official build from command line? $\endgroup$ – Philip Bayer Mar 12 '18 at 16:46
  • 1
    $\begingroup$ Just unpack the tarball. $\endgroup$ – dr. Sybren Mar 12 '18 at 16:48
0
$\begingroup$

If you would rather not or can't use blender official build tarball, the snap installer worked for me.

According to this tutorial (http://ubuntuhandbook.org/index.php/2017/09/blender-2-79-released-install-it-in-ubuntu/)

Running the following should work for ubuntu:

sudo apt-get install snapd #if you don't already have snap
sudo snap install blender --classic
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.