4
4
Setting up Matplotlib for development
5
5
=====================================
6
6
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
+
7
24
.. _dev-environment :
8
25
9
26
Creating a dedicated environment
10
27
================================
11
28
You should set up a dedicated environment to decouple your Matplotlib
12
29
development from other Python and Matplotlib installations on your system.
30
+
31
+ Using virtual environments
32
+ --------------------------
33
+
13
34
Here we use python's virtual environment `venv `_, but you may also use others
14
35
such as conda.
15
36
@@ -28,22 +49,27 @@ and activated with one of the following::
28
49
Whenever you plan to work on Matplotlib, remember to activate the development
29
50
environment in your shell.
30
51
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.
33
55
34
- Matplotlib is hosted at https://github.com/matplotlib/matplotlib.git.
56
+ A new conda environment can be set-up with::
35
57
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
38
59
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.
40
62
41
- This will place the sources in a directory :file: `matplotlib ` below your
42
- current working directory.
63
+ To activate your environment::
43
64
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.
47
73
48
74
Installing Matplotlib in editable mode
49
75
======================================
0 commit comments