1
- GNU-Linux & MacOS
2
- ======================
1
+ ===================
2
+ GNU-Linux & MacOS
3
+ ===================
3
4
4
5
.. contents ::
5
6
6
7
Prerequisites
7
- ---------------
8
+ =============
8
9
9
10
To use and/or contribute to PyBaMM, you must have Python 3.6 or 3.7
10
11
installed (note that 3.8 is not yet supported).
@@ -37,10 +38,12 @@ then follow instructions in link on adding brew to path, and run
37
38
brew install python3
38
39
39
40
Install PyBaMM
40
- -----------------
41
+ ==============
42
+
43
+ .. _user-install-label :
41
44
42
45
User install
43
- ~~~~~~~~~~~~
46
+ ------------
44
47
45
48
We recommend to install PyBaMM within a virtual environment, in order
46
49
not to alter any distribution python files. To create a virtual
@@ -64,10 +67,20 @@ the environment and go back to your original system, just type:
64
67
65
68
deactivate
66
69
67
- PyBaMM can be installed via pip:
70
+ PyBaMM can be installed via pip. On macOS, it is necessary to install the `SUNDIALS <https://computing.llnl.gov/projects/sundials/ >`__
71
+ library beforehand.
72
+
73
+ GNU/Linux and Windows
74
+ ~~~~~~~~~~~~~~~~~~~~~
75
+ .. code :: bash
76
+
77
+ pip install pybamm
68
78
79
+ macOS
80
+ ~~~~~
69
81
.. code :: bash
70
82
83
+ brew install sundials
71
84
pip install pybamm
72
85
73
86
PyBaMM’s dependencies (such as ``numpy ``, ``scipy ``, etc) will be
@@ -79,38 +92,35 @@ For an introduction to virtual environments, see
79
92
.. _scikits.odes-label :
80
93
81
94
Optional - scikits.odes solver
82
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
95
+ ------------------------------
83
96
84
97
Users can install `scikits.odes <https://github.com/bmcage/odes >`__ in
85
98
order to use the wrapped SUNDIALS ODE and DAE
86
99
`solvers <https://pybamm.readthedocs.io/en/latest/source/solvers/scikits_solvers.html >`__.
100
+ Currently, only GNU/Linux and macOS are supported.
87
101
88
- **A pre-requisite ** is the installation of a BLAS library (such as
89
- `openblas <https://www.openblas.net/ >`__). On Ubuntu/debian
90
-
91
- ::
102
+ GNU/Linux
103
+ ~~~~~~~~~
92
104
93
- sudo apt install libopenblas-dev
94
-
95
- and on Mac OS
105
+ .. code :: bash
96
106
97
- ::
107
+ apt install libopenblas-dev
108
+ pybamm_install_odes --install-sundials
98
109
99
- brew install openblas
110
+ The ``pybamm_install_odes `` command is installed with PyBaMM. It automatically downloads and installs the SUNDIALS library on your
111
+ system (under ``~/.local ``), before installing ``sckits.odes `` (by running ``pip install scikits.odes ``).
100
112
101
- After installing PyBaMM, the following command can be used to
102
- automatically install `` scikits.odes `` and its dependencies
113
+ macOS
114
+ ~~~~~
103
115
104
- ::
105
-
106
- $ pybamm_install_odes --install-sundials
116
+ .. code :: bash
107
117
108
- The `` --install-sundials `` option is used to activate automatic
109
- downloads and installation of the sundials library, which is required by
110
- `` scikits.odes ` `.
118
+ pip install scikits.odes
119
+
120
+ Assuming that the SUNDIALS were installed as described :ref: ` above<user-install-label> `.
111
121
112
122
Developer install
113
- ~~~~~~~~~~~~~~~~~~
123
+ -----------------
114
124
115
125
If you wish to contribute to PyBaMM, you should get the latest version
116
126
from the GitHub repository. To do so, you must have Git and graphviz
@@ -159,7 +169,7 @@ Before you start contributing to PyBaMM, please read the `contributing
159
169
guidelines <CONTRIBUTING.md> `__.
160
170
161
171
Uninstall PyBaMM
162
- --------------------
172
+ ================
163
173
164
174
PyBaMM can be uninstalled by running
165
175
@@ -170,7 +180,7 @@ PyBaMM can be uninstalled by running
170
180
in your virtual environment.
171
181
172
182
Troubleshooting
173
- -------------------
183
+ ===============
174
184
175
185
**Problem: ** I’ve made edits to source files in PyBaMM, but these are
176
186
not being used when I run my Python script.
0 commit comments