Movatterモバイル変換


[0]ホーム

URL:


You are reading an old version of the documentation (v2.0.0). For the latest version seehttps://matplotlib.org/stable/faq/environment_variables_faq.html
matplotlib

Navigation


Travis-CI:

Table Of Contents

Related Topics

This Page

Quick search

Environment Variables

HOME

The user’s home directory. On linux,~ is shorthand forHOME.

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?.

Setting environment variables in Linux and OS-X

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

BASH/KSH

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}:~/bin

To make your changes available in the future, add the commands to your~/.bashrc file.

CSH/TCSH

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}:~/bin

To make your changes available in the future, add the commands to your~/.cshrc file.

Setting environment variables in windows

Open theControl Panel (Start ‣ Control Panel),start theSystem program. Click theAdvanced taband select theEnvironment Variables button. You can edit or add totheUser Variables.

© Copyright 2002 - 2012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the Matplotlib development team; 2012 - 2016 The Matplotlib development team. Last updated on Feb 20, 2017. Created usingSphinx 1.5.2.

[8]ページ先頭

©2009-2025 Movatter.jp