BornAgain GUI application for macOS is provided as 64-bit `.dmg` installer.
#### Prequisite: Python
BornAgain Python package is available in PyPI repository and can be installed with `pip`. This package is required for running scripts or importing them into the GUI application.
As a prerequisite, Python must be installed.
To install and run BornAgain for the first time proceed with the following steps:
Note that pre-installed Python on MacOS may be outdated.
Check the installed version with `python3 --version`.
Which versions are compatible with BornAgain
can be inferred from the available installers at
* {{% url-releases %}}/mac_arm or
* {{% url-releases %}}/mac_x64.
-[Install Python](#install-python)
The official Python installers can be downloaded from https://www.python.org/downloads.
If Python is already installed and set up, this block can be skipped.
{{</alert>}}
{{<alerttheme="warning">}}
While Python comes pre-installed on macOS, it is always quite outdated and not recommended to use together with BornAgain libraries.
{{</alert>}}
The installer for appropriate version of Python can be downloaded from https://www.python.org/downloads.
Choose Python version according to the compatibility table:
BornAgain version | Supported Python versions
------------------|---------------------------
20.0 | 3.8 to 3.10
Run the installer and follow the steps.
Ensure that `pip` package manager is checked for installation. Command
```
$ python3 -m ensurepip
```
will install `pip` if it is missing.
##### Alternative way
For Homebrew users:
```
```
$ brew install python3
$ brew install python3
```
```
### Install BornAgain Python package
In the following, we assume that `python` is an alias for `python3`.
{{<alerttheme="info">}}
#### Install BornAgain as Python-only package
For using BornAgain as GUI application only, this block can be skipped.
{{</alert>}}
BornAgain Python package in available in the public repository and can be installed with `pip`:
If the BornAgain GUI is not required as only Python scripting mode is to be used,
then BornAgain can be installed as a Python package from the `pip` repository:
```
```
$ python3 -m pip install bornagain
$ python -m pip install bornagain
```
```
### Install BornAgain GUI application
#### Install BornAgain GUI application
{{<alerttheme="info">}}
For using BornAgain in scripts only, this block can be skipped.
{{</alert>}}
The BornAgain installer can be downloaded from {{% url-releases %}}.
A Linux installer for BornAgain (Python and GUI)
Its type must match the processor architecture, e.g.
can be downloaded from
`{{% recommended-macinstaller-amd64 %}}` or
* {{% url-releases %}}/mac_arm or
`{{% recommended-macinstaller-arm %}}`.
* {{% url-releases %}}/mac_x64.
Choose the installer that fits your version of Python.
After downloading the installer, double click `.dmg` file to mount it, accept the license agreement and then drag the BornAgain icon onto the Applications shortcut icon.
After downloading the installer, double click `.dmg` file to mount it, accept the license agreement and then drag the BornAgain icon onto the Applications shortcut icon.