#6235: set MPLCONFIGDIR environment variable when Sage starts up
--------------------+-------------------------------------------------------
Reporter: was | Owner: cwitty
Type: defect | Status: new
Priority: minor | Milestone: sage-4.0.2
Component: misc | Keywords:
--------------------+-------------------------------------------------------
Comment(by was):
{{{
2009/6/6 Brian Granger <>:
>
>> I want to reopen this thread.
>
> Great! matplotlib under Sage is still broken for me because of this
> issue - I would love to see this resolved.
>
>> I have a build farm with many (nearly 20) different OS's that all build
and test
>> Sage in parallel. My home directory on each of those machines is NFS
exported
>> and shared. I sometimes have tests fail because all these different
>> Sage's are trying to write to the same $HOME/.matplotlib directory
>> (for temp files, configuration, etc.).
>> For Sage itself, I set SAGE_HOME to a fast local scratch disk (on each
>> machine), which completely solves any contention problems for
>> *everything* related to Sage temp files, configuration, etc., with the
>> notable exception of matplotlib.
>
> I hadn't thought of this issue, but it is another good reason to not
> use $HOME/.matplotlib for the Sage matplotlib.
>
>> Thus I would also prefer it if
>> Sage's matplotlib directory were under SAGE_HOME instead of it being
>> the default $HOME/.matplotlib.
>>
>> Thoughts?
>
> I think the simplest solution is to have Sage set:
>
> export MPLCONFIGDIR=$SAGE_HOME/matplotlib
>
> But, wait, does SAGE_HOME point to $HOME/.sage by default? That is
> the right place for this, I just don't remember exactly where
> SAGE_HOME points.
Yep, it does. We can make sure easily enough by running Sage and asking:
sage: DOT_SAGE
'/Users/wstein/.sage/'
By the way, I just realized it is called "DOT_SAGE", not "SAGE_HOME".
This is now:
http://trac.sagemath.org/sage_trac/ticket/6235
-- William
>
> I don't even think we need to put a default matplotlibrc file there,
> so we don't have to worry about it becoming out of date. If people
> want to add their own matplotlibrc file to this directory they can,
> but the default will be that matplotlib works.
>
> Cheers,
>
> Brian
>
>> William
>>
>>
>>>> In the mailing list thread, the option was brought up to have the
user
>>>> put in a command in their init.sage file if they wanted a custom Sage
>>>> initialization for matplotlib. Setting the MATPLOTLIBRC variable in
the
>>>> init.sage file should work, I think.
>>>
>>> Yes, but I don't see this file in my .sage directory. Where would it
be?
>>>
>>>> In reality, (I think) the people this affects are the people that
have
>>>> already customized their system install of matplotlib. Those are the
>>>> people that (I think) would be capable of writing another command in
>>>> their init.sage or something to have Sage have a custom matplotlibrc
file.
>>>
>>> Yes, for the most part I agree with this. But it is not quite that
>>> simple. I still need/want to be able to configure matplotlib for Sage
>>> and my own install separately. That means I have to copy my own
>>> matplotlibrc file into .sage, make edits and set variables in
>>> init.sage.
>>>
>>>> On the other hand, I can see the nice thing about Sage being totally
>>>> self-contained and not pulling settings from a user's home directory
for
>>>> options.
>>>
>>> Yes, I think Sage should "Just Work", even for users that have
>>> matplotlib installed previously. This is simple enough to fix, I
>>> don't see why we wouldn't. The only thing is that the matplotlibrc
>>> file needs to be updated anytime that matplotlib itself is updated.
>>>
>>> Cheers,
>>>
>>> Brian
>>>
>>> >
>>>
>>
>>
>>
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6235#comment:1>
Sage <http://sagemath.org/>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---