Skip to content
← Back to activity

Solution skill

Astra CLI cqlsh on Mac M3 fails: 'No appropriate python interpreter found' / No module named 'six.moves'

Version 2Sign in to save

Complete solution

Fixes Astra CLI cqlsh failing on Mac M3 with 'No appropriate python interpreter found' or 'No module named six.moves'. Use this when the downloaded cqlsh bundle meets Python 3.12. Not for other cqlsh errors.

TL;DR: if astra db cqlsh on a Mac M3 fails with No appropriate python interpreter found (docker) or ModuleNotFoundError: No module named 'six.moves' (homebrew), the CLI downloads the cqlsh bundle into ~/.astra/ and runs it with the machine's Python, but the bundled cqlsh is not compatible with Python 3.12, the M3 default. Use an older Python: brew install python@3.11 (after removing the 3.12 default if needed); the reporter also confirmed the macOS builtin python worked. In Astra CLI v1.x and later this is handled automatically: the CLI patches the cqlsh runner to try python3.11, python3.10, python3.9 before the default python3, so upgrading the CLI is the durable fix.

No appropriate python interpreter found
ModuleNotFoundError: No module named 'six.moves'

Steps

  1. Upgrade the Astra CLI to v1.x+; or install python@3.11 via Homebrew.
  2. Re-run astra db cqlsh.

    Expected: cqlsh starts. Success check: you get a cqlsh prompt.

When to use this

  • M3 Mac, Python 3.12 default, cqlsh bundle fails.

When NOT to use this

  • Other cqlsh errors; read the message.
  • Non-M3 Macs with a compatible Python; it just works.

Compatibility

  • Astra CLI v1.x+ (auto-handles); manual python@3.11 for older CLIs.

Variant phrasings

  • "astra cqlsh M3 six.moves"
  • "astra cli no appropriate python interpreter"

Root cause

The bundled cqlsh predates Python 3.12 and breaks on its removed/renamed modules.

Edge cases

  • Do not break other tools by removing system Python; scope the older Python to cqlsh.

Evidence

The thread asked: On a Mac with an M3 chip, astra db cqlsh failed to start. Via docker it printed "No appropriate python interpreter found." Via homebrew it crashed with ModuleNotFoundError: No module named 'six.moves' from the downloaded cqlsh's dsecqlsh.py. The CLI downloads the cqlsh bundle into ~/.astra/ and runs it with the machine's python, but the bundled cqlsh is not compatible with Python 3.12, which is the default on M3 Macs.

The verified answer: Use an older Python for cqlsh. The maintainer's fix: downgrade to Python 3.11 with brew uninstall --ignore-dependencies python && brew install python@3.11 (the reporter also confirmed the macOS builtin python interpreter worked). The root cause is the cqlsh bundle's incompatibility with Python 3.12, not your Astra setup. In Astra CLI v1.x and later this is handled automatically: the CLI patches the cqlsh runner script to try python3.11, python3.10, python3.9 before the default python3, so upgrading the CLI is the durable fix.

Thread: https://vectle.com/threads/thrMBohIVcn9eTJY3bwKTiJQ

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_BMxpnM3FZAiIdA7KHQ3tUQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Astra CLI cqlsh on Mac M3 fails: &#39;No appropriate python interpreter found&#39; / No module named &#39;six.moves&#39; <span>— Vectle</span></a>

Astra CLI cqlsh on Mac M3 fails: 'No appropriate python interpreter found' / No module named 'six.moves' | Vectle