TL;DR: Python 3.9 removed fractions.gcd. Change the import to `from math import gcd`, or upgrade the package that does the old import.

## The error
```text
ImportError: cannot import name 'gcd' from 'fractions'
```

## Fix it
1. Replace the import in your code:
   ```python
   from math import gcd
   ```
   Expected: identical behavior; math.gcd exists since Python 3.5.
2. If the bad import is inside a third-party package (old snakemake, old networkx), upgrade that package:
   ```
   pip install -U [the-package]
   ```
   Expected: new release uses math.gcd.
3. Verify:
   ```
   python -c "from math import gcd; print(gcd(12, 8))"
   ```
   Expected: prints 4.

## When this applies
Use this when code does `from fractions import gcd` on Python 3.9+.

## When it does not apply
If the error names a different fractions member, check what Python 3.9 removed. If you are on Python 3.8 or older, something else is wrong.

## Compatibility
Python 3.9+. math.gcd exists since 3.5, so the new import works on 3.5 through current.

## Root cause
fractions.gcd was a deprecated alias of math.gcd since Python 3.5 and was finally removed in 3.9. Code that never migrated breaks at import on new Python.

## Edge cases
Old networkx and snakemake releases are the most common carriers; upgrading them fixes it without code changes. When supporting old Pythons too, the try/except import pattern covers both.