44Setting up Matplotlib for development
55=====================================
66
7+ Retrieving the latest version of the code
8+ =========================================
9+
10+ Matplotlib is hosted at https://github.com/matplotlib/matplotlib.git.
11+
12+ You can retrieve the latest sources with the command (see
13+ :ref: `set-up-fork ` for more details)::
14+
15+ git clone https://github.com/matplotlib/matplotlib.git
16+
17+ This will place the sources in a directory :file: `matplotlib ` below your
18+ current working directory.
19+
20+ If you have the proper privileges, you can use ``git@ `` instead of
21+ ``https:// ``, which works through the ssh protocol and might be easier to use
22+ if you are using 2-factor authentication.
23+
724.. _dev-environment :
825
926Creating a dedicated environment
1027================================
1128You should set up a dedicated environment to decouple your Matplotlib
1229development from other Python and Matplotlib installations on your system.
30+
31+ Using virtual environments
32+ --------------------------
33+
1334Here we use python's virtual environment `venv `_, but you may also use others
1435such as conda.
1536
@@ -28,22 +49,27 @@ and activated with one of the following::
2849Whenever you plan to work on Matplotlib, remember to activate the development
2950environment in your shell.
3051
31- Retrieving the latest version of the code
32- =========================================
52+ Conda dev environment
53+ ---------------------
54+ After you have cloned the repo change into the matplotlib directory.
3355
34- Matplotlib is hosted at https://github.com/matplotlib/matplotlib.git.
56+ A new conda environment can be set-up with::
3557
36- You can retrieve the latest sources with the command (see
37- :ref: `set-up-fork ` for more details)::
58+ conda env create -f environment.yml
3859
39- git clone https://github.com/matplotlib/matplotlib.git
60+ Note that if you have mamba installed you can replace conda with mamba in
61+ the above command.
4062
41- This will place the sources in a directory :file: `matplotlib ` below your
42- current working directory.
63+ To activate your environment::
4364
44- If you have the proper privileges, you can use ``git@ `` instead of
45- ``https:// ``, which works through the ssh protocol and might be easier to use
46- if you are using 2-factor authentication.
65+ conda activate mpl-dev
66+
67+ Finish the install by the following command::
68+
69+ pip install -e .
70+
71+ Whenever you plan to work on Matplotlib, remember to ``conda activate mpl-dev ``
72+ in your shell.
4773
4874Installing Matplotlib in editable mode
4975======================================
0 commit comments