Codex 0.20.0 fails to login due to unable to find Python3.exe on Windows
Resolved 💬 8 comments Opened Aug 12, 2025 by doggy8088 Closed Aug 20, 2025
💡 Likely answer: A maintainer (Alb-O, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
codex-cli 0.20.0
Which model were you using?
gpt-5
What platform is your computer?
Microsoft Windows NT 10.0.19045.0 x64
What steps can reproduce the bug?
npm i -g @openai/codex
codex login
What is the expected behavior?
Starting local login server on http://localhost:1455
. If your browser did not open, navigate to this URL to authenticate:
https://auth.openai.com/oauth/authorize?response_type=code&client_id=xxx&redirect_uri=http%3A%2F%2Flocalhost%3A1455%2Fauth%2Fcallback&scope=openid+profile+email+offline_access&code_challenge=xxx&code_challenge_method=S256&id_token_add_organizations=true&codex_cli_simplified_flow=true&state=xxx
Successfully logged in
What do you see instead?
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Apps > Advanced app settings > App execution aliases.
Error logging in: login_with_chatgpt subprocess failed:
If I disabled App execution alias for Python3.exe, the error will shown:
Error logging in: program not found
Additional information
It because I install Python here: C:\Python312
I only have python.exe, but Codex seems looks for python3.exe. I think look for python.exe should be accepted.
8 Comments
I had to install python 3 from the Windows Store for it to work, but yes, that should ideally not be necessary and it should pick up other installations
same issue - don't they test this stuff?
This works: https://github.com/openai/codex/issues/2057 basically make a copy of python.exe called python3.exe
I have the same issue:
I have started the application without arguments and Python 3.11 is installed via the Microsoft Store.
Version infos:
Problem:
codex needs python3 (not just python).
Solution:
I copied python.exe as python3.exe in
C:\Users\mohgh\AppData\Local\Programs\Python\Python312
as commented by:
[lockster-at-secondskin](https://github.com/openai/codex/issues/2206#issuecomment-3177420671)
version 0.22.0 no longer uses python for this log in operation. Could you try the latest version? You can upgrade by
npm -g i @openai/codex@latest.@seratch tried again and still doesn't quite work. Even uninstalled and reinstalled again in a totally clean wsl.
@seratch I'm closing this because we fixed the Python issue. Please open a new issue with the errors you're seeing now.