Codex `login` has silent dependency on python3
Resolved 💬 3 comments Opened Jul 13, 2025 by tabletcorry Closed Oct 27, 2025
💡 Likely answer: A maintainer (tabletcorry, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
codex-cli 0.6.0
Which model were you using?
N/A
What platform is your computer?
Linux 6.12.28 aarch64 unknown
What steps can reproduce the bug?
Execute codex login inside of container that lacks the python3 binary.
What is the expected behavior?
Either of:
- Work regardless of the presence of
python3since that is an odd dependency for a rust program. - Present a reasonable error message to allow the user to resolve the issue.
What do you see instead?
Program terminates with completely unclear error message:
Error logging in: No such file or directory (os error 2)
I had to use strace to figure out the cause of the issue.
Additional information
Obviously it is fairly rare for a platform to lack python3, but it does happen, especially when using tools inside minimal container images. So I can workaround this, but it seems an oddly sharp edge to have.
Presumably caused by this code, though I didn't check for other instances: https://github.com/openai/codex/blob/main/codex-rs/login/src/lib.rs#L31
3 Comments
Oh, and if the
python3dependency is kept, the homebrew formula should declare the requirement.There's also an expectation that $HOME/.codex exists. This can cause the same error so make sure to create that directory.
In my case, I needed to make a /root/.codex
Error logging in: No such file or directory (os error 2)Thanks for the bug report.
This issue is no longer relevant. We replaced the python-based oauth server with a rust-based one several months ago.