Closed matt-chan closed 7 years ago
Would the following trick work?:
i.e. this part
runtest = ' '.join([
'export MATPLOTLIBRC=$PWD;',
'echo "backend: agg" > $MATPLOTLIBRC/matplotlibrc;',
'%s python setup.py build_ext -i; ' % prebuildopts,
'nosetests -v',
])
Yep, but I think users would still run into the same problem if they weren't doing the tests...
On Mon, 3 Apr 2017 at 11:29 Toon Verstraelen notifications@github.com wrote:
Would the following trick work?:
i.e. this part
runtest = ' '.join([ 'export MATPLOTLIBRC=$PWD;', 'echo "backend: agg" > $MATPLOTLIBRC/matplotlibrc;', '%s python setup.py build_ext -i; ' % prebuildopts, 'nosetests -v', ])
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/theochem/horton/issues/219#issuecomment-291231489, or mute the thread https://github.com/notifications/unsubscribe-auth/AA_-Nfvv3Vm_D-9BuDb-qx9hBcIVtRytks5rsTqIgaJpZM4Mx6Vg .
-- Matt
Sent from my phone
I think matplotlib is configured incorrectly in your case. The default configuration of matplotlib assumes some GUI environment is available. If that is not the case, you should switch to a non-GUI backend before using matplotlib. Most users don't have this problem because the default GUI backend will just work on a desktop. (The snippet you mentioned only loops over GUI backends, which may not be what you want.)
I'm going to close this. This is not a HORTON but a Matplotlib issue. As long as Matplotlib developers decide that the default backend requires X, there is little we can do. There is no point in changing the Matplotlib backend from HORTON because that could result in undesired behavior for those users who still expect the default backend to be used.
It's driving me crazy. We should find a more permanent solution to the matplotlib backend problem. It actually segfaults in Conda if we use our current code.
I found something like this on stackoverflow:
It might work.
Or we can just remove the tests that do plotting. Not sure if that's a good idea though.