
Contents
PATH¶The list of directories searched to find executable programs
PYTHONPATH¶The list of directories that is added to Python’s standard search list whenimporting packages and modules
MPLCONFIGDIR¶This is the directory used to store user customizations to matplotlib, aswell as some caches to improve performance. IfMPLCONFIGDIR is notdefined,HOME/.matplotlib is used if it is writable.Otherwise, the python standard librarytempfile.gettmpdir() isused to find a base directory in which thematplotlibsubdirectory is created.
MPLBACKEND¶This optional variable can be set to choose the matplotlib backend. Using the-d command line parameter or theuse() function willoverride this value. SeeWhat is a backend?.
To list the current value ofPYTHONPATH, which may be empty, try:
echo $PYTHONPATH
The procedure for setting environment variables in depends on what your defaultshell is.BASH seems to be the most common, butCSH isalso common. You should be able to determine which by running at the commandprompt:
echo $SHELL
To create a new environment variable:
exportPYTHONPATH=~/Python
To prepend to an existing environment variable:
export PATH=~/bin:${PATH}The search order may be important to you, do you want~/bin tobe searched first or last? To append to an existing environmentvariable:
export PATH=${PATH}:~/binTo make your changes available in the future, add the commands to your~/.bashrc file.
To create a new environment variable:
setenvPYTHONPATH~/Python
To prepend to an existing environment variable:
setenv PATH ~/bin:${PATH}The search order may be important to you, do you want~/bin to be searchedfirst or last? To append to an existing environment variable:
setenv PATH ${PATH}:~/binTo make your changes available in the future, add the commands to your~/.cshrc file.
Open theControl Panel (Start ‣ Control Panel),start theSystem program. Click theAdvanced taband select theEnvironment Variables button. You can edit or add totheUser Variables.