Installation#

Astrocook is available as a standalone app for macOS or as a Python package for advanced users.

Quick Start ( macOS)#

If you are on a Mac and want to use the GUI immediately without managing Python environments:

  1. Download the App: Go to our Latest Release Page and look for Astrocook.dmg.

  2. Install: Open Astrocook.dmg and drag the app to your Applications folder.

  3. Run: Double-click Astrocook in your Applications.

Note

If you see a security warning, you may need to Right-Click the app and select ‘Open’ the first time, or explicitly authorize the app on System Settings).

Installing with pip (Linux, Windows, macOS)#

Astrocook requires Python 3.12 or later. pip installs all the other dependencies (PySide6, astropy, numpy, scipy, matplotlib, …).

Install it from PyPI, preferably in a virtual environment:

python3 -m venv ac2
source ac2/bin/activate  # On Windows: ac2\Scripts\activate
pip install astrocook

The Bayesian fit (MCMC and nested sampling, corner plots) needs optional dependencies (emcee, dynesty, corner), which the macOS app already includes. To install them with the package:

pip install "astrocook[bayes]"

Without them, the Bayesian entries of the system inspector are disabled and the fit_bayesian recipe raises an error naming this command.

Note

If the venv command fails, you may need to install the module first (e.g., sudo apt install python3-venv on Ubuntu/Debian). Check the Python version with python3 --version; if it is older than 3.12, use a newer interpreter (e.g., python3.12 -m venv ac2).

To update to the latest version, run pip install --upgrade astrocook. The development version (the master branch of the repository, not released) installs from GitHub with pip install git+https://github.com/DAS-OATs/astrocook.git.

AI agents (Claude Code, the Claude desktop app, other MCP clients) can drive Astrocook through its MCP server, installed with the [mcp] extra (or run in a Docker image): see the tutorial Using Astrocook from an AI Agent.

Updating Astrocook#

Help > Software Update… asks GitHub for the latest release and compares it with the version you run. Nothing is sent but a generic request, and nothing is installed without you; what the dialog offers depends on how Astrocook is installed:

  • macOS app: Download fetches Astrocook.dmg (to ~/Downloads), checks its SHA-256 checksum against the one GitHub gives for the file (the dialog says so when the release gives none) and opens it. Then close Astrocook and drag the new app into Applications.

  • pip install (Linux, Windows, macOS from source): the dialog shows the pip install -U ... command, with a Copy button; run it yourself in the same environment. Astrocook never runs pip on its own.

  • git checkout or editable install: nothing is compared (a checkout of the development branch has no meaningful version number) and nothing is asked of the network: the dialog shows the version and the commit and says to update with git pull. The check at start-up skips these installs.

If there is no network connection the dialog says so and nothing else happens. The check at start-up is off unless you turn it on in Settings.

The Software Update dialog

Running the App#

With the virtual environment active, launch the GUI from any directory:

astrocook [file ...]

python -m astrocook [file ...] is equivalent. The optional arguments are spectra or sessions to open at startup.

Note

If the app fails to launch with a Qt/xcb error, ensure your system has the necessary Qt libraries installed (e.g., sudo apt install libxcb-cursor0).

Using Astrocook from Python#

Astrocook can also be used from your own scripts, without the GUI: see the tutorial Using Astrocook from Python.

Developer Installation#

To modify the code, clone the repository and install it in editable mode, with the test and development tools:

git clone https://github.com/DAS-OATs/astrocook.git
cd astrocook
python3 -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install -e ".[dev]"

Code changes take effect without reinstalling. After a git pull that changes pyproject.toml (dependencies, commands), run pip install -e ".[dev]" again: commands such as astrocook are created at installation time. The tests run with pytest.

Optional extras for maintenance tasks: pip install -e ".[docs]" to build this documentation (generate_html.sh, deploy_docs.sh) and pip install -e ".[build]" to build the macOS app (build_app.sh; the DMG also needs brew install create-dmg).