Originally titled: MPLCONFIGDIR .matplotlib not writeable on matplotlib import
I am running the tutorial for pylearn2 and I'm getting some errors when it imports matplotlib.pyplot. Some information that is probably unnecessary is that I'm running it in a VirtualBox generated by Vagrant. I've seen a couple of similar errors all referring to django, but I'm not trying to webhost, nor am I out of space. I've tried running python as root, as unsafe as that is, but it still didn't work. I have also tried setting my MPLCONFIGDIR variable with the same error. Please let me know if there is any more information I can include. Thanks.
Traceback (most recent call last): File "/home/vagrant/pylearn2/pylearn2/scripts/plot_monitor.py", line 274, in <module> main() File "/home/vagrant/pylearn2/pylearn2/scripts/plot_monitor.py", line 57, in main import matplotlib.pyplot as plt File "/usr/lib/pymodules/python2.7/matplotlib/__init__.py", line 774, in <module> rcParams = rc_params() File "/usr/lib/pymodules/python2.7/matplotlib/__init__.py", line 692, in rc_params fname = matplotlib_fname() File "/usr/lib/pymodules/python2.7/matplotlib/__init__.py", line 604, in matplotlib_fname fname = os.path.join(get_configdir(), 'matplotlibrc') File "/usr/lib/pymodules/python2.7/matplotlib/__init__.py", line 253, in wrapper ret = func(*args, **kwargs) File "/usr/lib/pymodules/python2.7/matplotlib/__init__.py", line 475, in _get_configdir raise RuntimeError("'%s' is not a writable dir; you must set %s/.matplotlib to be a writable dir. You can also set environment variable MPLCONFIGDIR to any writable directory where you want matplotlib data stored "% (h, h)) RuntimeError: '/home/vagrant' is not a writable dir; you must set /home/vagrant/.matplotlib to be a writable dir. You can also set environment variable MPLCONFIGDIR to any writable directory where you want matplotlib data stored /home/vagrant is my home directory so it is writable, but for the concerned...
vagrant@precise64:~$ ls -ld /home/vagrant drwxrwxrwx 1 vagrant vagrant 16384 Sep 26 17:40 /home/vagrant vagrant@precise64:~$ ls -ld /home/vagrant/.matplotlib/ drwxrwxrwx 1 vagrant vagrant 4096 Sep 26 18:07 /home/vagrant/.matplotlib/ UPDATE:
it seems to be caused by
OSError: [Errno 26] Text file busy: '/home/vagrant/.matplotlib/tmp3ciLMo' which I suspect has something to do with vagrant mounting my home folder as a synced_folder