diff --git a/doc/install/index.rst b/doc/install/index.rst index 6ac79cc8c133..4eb4c201862c 100644 --- a/doc/install/index.rst +++ b/doc/install/index.rst @@ -1,6 +1,8 @@ .. redirect-from:: /users/installing .. redirect-from:: /users/installing/index +.. highlight:: sh + ************ Installation ************ @@ -11,9 +13,7 @@ Install an official release Matplotlib releases are available as wheel packages for macOS, Windows and Linux on `PyPI `_. Install it using -``pip``: - -.. code-block:: sh +``pip``:: python -m pip install -U pip python -m pip install -U matplotlib @@ -44,15 +44,11 @@ Various third-parties provide Matplotlib for their environments. Conda packages -------------- -Matplotlib is available both via the *anaconda main channel* - -.. code-block:: sh +Matplotlib is available both via the *anaconda main channel* :: conda install matplotlib -as well as via the *conda-forge community channel* - -.. code-block:: sh +as well as via the *conda-forge community channel* :: conda install -c conda-forge matplotlib @@ -62,10 +58,8 @@ Python distributions Matplotlib is part of major Python distributions: - `Anaconda `_ - - `ActiveState ActivePython `_ - - `WinPython `_ Linux package manager @@ -90,9 +84,7 @@ Matplotlib makes nightly development build wheels available on the `scientific-python-nightly-wheels Anaconda Cloud organization `_. These wheels can be installed with ``pip`` by specifying -scientific-python-nightly-wheels as the package index to query: - -.. code-block:: sh +scientific-python-nightly-wheels as the package index to query:: python -m pip install \ --upgrade \ @@ -143,8 +135,7 @@ Aspects of some behavioral defaults of the library can be configured via: environment_variables_faq.rst Default plotting appearance and behavior can be configured via the -:ref:`rcParams file ` - +:ref:`rcParams file `. Dependencies ============ @@ -266,13 +257,17 @@ at the Terminal.app command line:: python3 -c 'import matplotlib; print(matplotlib.__version__, matplotlib.__file__)' -You should see something like :: +You should see something like + +.. code-block:: none 3.10.0 /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/matplotlib/__init__.py where ``3.10.0`` is the Matplotlib version you just installed, and the path following depends on whether you are using Python.org Python, Homebrew or -Macports. If you see another version, or you get an error like :: +Macports. If you see another version, or you get an error like + +.. code-block:: none Traceback (most recent call last): File "", line 1, in diff --git a/doc/install/troubleshooting_faq.inc.rst b/doc/install/troubleshooting_faq.inc.rst index d130813a80c6..fce94cef6a66 100644 --- a/doc/install/troubleshooting_faq.inc.rst +++ b/doc/install/troubleshooting_faq.inc.rst @@ -11,12 +11,11 @@ Obtaining Matplotlib version ---------------------------- To find out your Matplotlib version number, import it and print the -``__version__`` attribute:: - - >>> import matplotlib - >>> matplotlib.__version__ - '0.98.0' +``__version__`` attribute: +>>> import matplotlib +>>> matplotlib.__version__ +'0.98.0' .. _locating-matplotlib-install: @@ -24,12 +23,11 @@ To find out your Matplotlib version number, import it and print the ----------------------------------- You can find what directory Matplotlib is installed in by importing it -and printing the ``__file__`` attribute:: - - >>> import matplotlib - >>> matplotlib.__file__ - '/home/jdhunter/dev/lib64/python2.5/site-packages/matplotlib/__init__.pyc' +and printing the ``__file__`` attribute: +>>> import matplotlib +>>> matplotlib.__file__ +'/home/jdhunter/dev/lib64/python2.5/site-packages/matplotlib/__init__.pyc' .. _locating-matplotlib-config-dir: @@ -39,32 +37,32 @@ and printing the ``__file__`` attribute:: Each user has a Matplotlib configuration directory which may contain a :ref:`matplotlibrc ` file. To locate your :file:`matplotlib/` configuration directory, use -:func:`matplotlib.get_configdir`:: +:func:`matplotlib.get_configdir`: - >>> import matplotlib as mpl - >>> mpl.get_configdir() - '/home/darren/.config/matplotlib' +>>> import matplotlib as mpl +>>> mpl.get_configdir() +'/home/darren/.config/matplotlib' On Unix-like systems, this directory is generally located in your :envvar:`HOME` directory under the :file:`.config/` directory. In addition, users have a cache directory. On Unix-like systems, this is separate from the configuration directory by default. To locate your -:file:`.cache/` directory, use :func:`matplotlib.get_cachedir`:: +:file:`.cache/` directory, use :func:`matplotlib.get_cachedir`: - >>> import matplotlib as mpl - >>> mpl.get_cachedir() - '/home/darren/.cache/matplotlib' +>>> import matplotlib as mpl +>>> mpl.get_cachedir() +'/home/darren/.cache/matplotlib' On Windows, both the config directory and the cache directory are the same and are in your :file:`Documents and Settings` or :file:`Users` -directory by default:: +directory by default: - >>> import matplotlib as mpl - >>> mpl.get_configdir() - 'C:\\Documents and Settings\\jdhunter\\.matplotlib' - >>> mpl.get_cachedir() - 'C:\\Documents and Settings\\jdhunter\\.matplotlib' +>>> import matplotlib as mpl +>>> mpl.get_configdir() +'C:\\Documents and Settings\\jdhunter\\.matplotlib' +>>> mpl.get_cachedir() +'C:\\Documents and Settings\\jdhunter\\.matplotlib' If you would like to use a different configuration directory, you can do so by specifying the location in your :envvar:`MPLCONFIGDIR` pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy