|
|
# Installing dependencies on MacOs #
|
|
|
|
|
|
## MacPorts ##
|
|
|
The easiest way to install LMGC90's prerequisites is to use a package manager. The developer team uses exclusively MacPorts and cannot provide any advice if an other one is used.
|
|
|
|
|
|
To install MacPort: follow the instructions provided [here](https://www.macports.org/install.php)
|
|
|
The only supported way to install LMGC90's prerequisites by the developper teams is to use the [MacPort package manager]https://www.macports.org). There is no need for any other package manager (Homebrew or Anaconda) and installing those should be done only at your own risk and no help can be provided using those.
|
|
|
|
|
|
## Installing ##
|
|
|
|
|
|
To compile:
|
|
|
```
|
|
|
sudo port install gcc11 python38 py38-numpy swig-python cmake +gui
|
|
|
```
|
|
|
Then you need to set the compiler and python as the default on your system:
|
|
|
```
|
|
|
sudo port select gcc mp-gcc11
|
|
|
sudo port select python python38
|
|
|
```
|
|
|
_Note: here 11 stands for gcc11, any version from gcc4.5 to gcc10 should work.
|
|
|
In the same way 38 stands for python3.8 and any version from python3.3 should work_
|
|
|
Theses instructions has been used to successfully build LMGC90, at the time of writting (June 2022), on an Apple M1 Pro (Macbook Pro) with:
|
|
|
* MacOS Monterey 12.04
|
|
|
* XCode 13.4.1
|
|
|
* MacPort 2.7.2
|
|
|
|
|
|
Python 3.9 was kept because there was no `+python310` variants for vtk package.
|
|
|
|
|
|
Optional:
|
|
|
```shell
|
|
|
sudo port install hdf5 +fortran+gcc11 py38-h5py +gcc11
|
|
|
```
|
|
|
If you have any other version, you may need to adapt compiler and python version. To benefit from everything, the most simple is to run:
|
|
|
|
|
|
Optional but recommended:
|
|
|
```shell
|
|
|
sudo port install py38-scipy py38-matplotlib py38-pandas
|
|
|
```
|
|
|
sudo port install gcc-devel hdf5 +fortran cmake +gui swig-python
|
|
|
sudo port install py39-numpy py39-h5py vtk +python39
|
|
|
sudo port install py39-scipy py39-matplotlib py39-pandas
|
|
|
```
|
|
|
|
|
|
To visualize:
|
|
|
Then you need to set the compiler and python as the default on your system:
|
|
|
```
|
|
|
sudo port install vtk +python38
|
|
|
sudo port select --set python python39
|
|
|
sudo port select --set python3 python39
|
|
|
sudo port select --set gcc mp-gcc-devel
|
|
|
```
|
|
|
|
|
|
and then download Paraview software from [here](http://www.paraview.org/download)
|
|
|
|
|
|
To build the documentation:
|
|
|
```
|
|
|
sudo port install doxygen graphviz py38-sphinx py38-numpydoc texlive-latex-extra dvipng ImageMagick
|
|
|
sudo port install doxygen graphviz py39-sphinx py39-numpydoc texlive-latex-extra dvipng ImageMagick
|
|
|
sudo port select --set docutils py39-docutils
|
|
|
sudo port select --set pygments py39-pygments
|
|
|
sudo port select --set sphinx py39-sphinx
|
|
|
```
|
|
|
|
|
|
To read tutorials:
|
|
|
```
|
|
|
sudo port install py38-jupyter
|
|
|
sudo port install py39-jupyter
|
|
|
sudo port select --set ipython py39-ipython
|
|
|
sudo port select --set ipython3 py39-ipython
|
|
|
```
|
|
|
****
|
|
|
|
... | ... | |