Running Blender from a read-only NFS mount? (__pycache__ problem)

I am setting up multiple MacPros to run blender (64-bit version 2.66a) via the command line for remote rendering, using Red Hat Enterprise Linux 6 (think Fedora, Scientific Linux, etc). I want to have a central machine (call it host1) on which to put blender, so that I only have to update it in one place, and to share that to the others (call them client1, client2, …) read-only using NFS. Calling “blender -h” from client1 works fine. Trying to render, though, fails since blender tries to do some python caching and is not allowed to write to host1: (ignore the ALSA sound errors)

([email protected]) ~ > blender -b test.blend -o render -s 001 -e 001
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4185:(_snd_config_evaluate) function snd_func_card_driver returned error: Permission denied
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4185:(_snd_config_evaluate) function snd_func_concat returned error: Permission denied
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4185:(_snd_config_evaluate) function snd_func_refer returned error: Permission denied
ALSA lib conf.c:4664:(snd_config_expand) Evaluate error: Permission denied
ALSA lib pcm.c:2209:(snd_pcm_open_noupdate) Unknown PCM default
AL lib: alsa_open_playback: Could not open playback device 'default': Permission denied
found bundled python: /opt/share/blender-2.66a-linux-glibc211-x86_64/2.66/python
Fatal Python error: Py_Initialize: Unable to get the locale encoding
Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 1558, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1525, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 586, in _check_name_wrapper
  File "<frozen importlib._bootstrap>", line 1023, in load_module
  File "<frozen importlib._bootstrap>", line 1004, in load_module
  File "<frozen importlib._bootstrap>", line 562, in module_for_loader_wrapper
  File "<frozen importlib._bootstrap>", line 854, in _load_module
  File "<frozen importlib._bootstrap>", line 990, in get_code
  File "<frozen importlib._bootstrap>", line 1051, in _cache_bytecode
  File "<frozen importlib._bootstrap>", line 1065, in set_data
OSError: [Errno 30] Read-only file system: '/opt/share/blender-2.66a-linux-glibc211-x86_64/2.66/python/lib/python3.3/encodings/__pycache__'
Abort (core dumped)

When I switch the mount to read-write, everything works fine (although the pycache isn’t created on host1; maybe it is temporary) and it renders successfully. Is there a way to turn off this caching? Or am I missing something else? Can I use the system python instead of the bundled version?

Thanks for any help!


on my machine I have a soft link to the real location for the current blender installation, i update the soft link everytime I need to change the Blender version keeping everything in 1 reference and in 1 place.

you got several Blender installations


and a soft link to the Blender version that you want


Perfect, thanks;


did the trick (or “export PYTHONDONTWRITEBYTECODE=1” in bash, I guess). The value doesn’t matter. (And adding “-noaudio” to the command line call.)

tyuz: yes, that would be nice too. What I am trying to get first is the equivalent of this over a network, where one machine shares a link to it’s blender installation, and the other machines use that one (on which I could set up multiple versions as well).