codex icon indicating copy to clipboard operation
codex copied to clipboard

Program Not Found - Windows

Open SinkHoleLabs opened this issue 1 year ago • 29 comments

What version of Codex is running?

codex-cli 0.20.0

Which model were you using?

Any

What platform is your computer?

Microsoft Windows NT 10.0.26100.0 x64

What steps can reproduce the bug?

Fresh install with npm install g -g @openai/codex results in a program not found error on initiation.

Attempted uninstall and reinstall as well as uninstall, clear npm cache, then reinstall

Image

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

No response

SinkHoleLabs avatar Aug 09 '25 01:08 SinkHoleLabs

It appears to only be downloading the version.json and the codex-tui.log

SinkHoleLabs avatar Aug 09 '25 01:08 SinkHoleLabs

I am running Node v20.15.1, python 3.10, and Windows 10 and this worked for me.

It appears to only be downloading the version.json and the codex-tui.log

What do you mean by that? Do you have python3 installed? If so, what does python3 --version say?

bolinfest avatar Aug 09 '25 01:08 bolinfest

I am running Python 3.13.6.

After install when I look in the .codex folder there is only the version.json and the log folder with the codex-tui.log.

After some more poking around it looks like the login function specifically isn't working. I can call other functions like codex logout and get a message that I am not logged in as well as help and debug.

Just typing in 'codex' launches to the selection between sign-in and API but selecting sign-in generates a program not found error.

SinkHoleLabs avatar Aug 09 '25 02:08 SinkHoleLabs

I have the same problem, it also says that the program was not found, even though I have it installed on Windows.

Python 3.10.9 Node v23.10.

Pavliczech avatar Aug 09 '25 07:08 Pavliczech

same problem

Image

brian95827 avatar Aug 09 '25 09:08 brian95827

same problem here

Image

danieldanila96 avatar Aug 09 '25 09:08 danieldanila96

Image

QaiserMajeed avatar Aug 09 '25 10:08 QaiserMajeed

I think similar issue Node v24.5.0 codex-cli 0.20.0 Python installed on conda env

Image

michaelcheng0407 avatar Aug 09 '25 10:08 michaelcheng0407

How to resolve this issue. Image

Wasauchimmer01 avatar Aug 09 '25 11:08 Wasauchimmer01

@Wasauchimmer01 @michaelcheng0407 @QaiserMajeed @danieldanila96 @brian95827 @SinkHoleLabs temporary fix whilst they fix it: Run npm i @openai/[email protected] to download the previous version

And then npx codex

That worked for me

Image

kieradev avatar Aug 09 '25 11:08 kieradev

@Wasauchimmer01 @michaelcheng0407 @QaiserMajeed @danieldanila96 @brian95827 @SinkHoleLabs temporary fix whilst they fix it: Run npm i @openai/[email protected] to download the previous version

And then npx codex

That worked for me

Image

in 0.19.0 codex cli asking API key it not fixed yet.

Wasauchimmer01 avatar Aug 09 '25 13:08 Wasauchimmer01

There is a workaround that worked for me in #2075

Edit: Scratch that - This workaround gets codex up and running but only on API. Still getting 'Error logging in: program not found'

SinkHoleLabs avatar Aug 09 '25 15:08 SinkHoleLabs

Same issue.

Says python not found, even though python.exe is in PATH. I noticed that the app execution aliases were enabled, but disabling them just changed the message to "program not found" instead of "Python not found..."

n00mkrad avatar Aug 09 '25 16:08 n00mkrad

I've fixed by installing "Python 3.13" from the Microsoft store. Figured out by running "python3" in a cmd/powershell, while switching toggle for Python in "App execution aliases".

Looks like there might some dependency on python3 being installed from MS store - This installs Python in "C:\Program Files\WindowsApps"

  • For reference, I have python and python3 installed through the web installers.

  • Windows 10

  • codex --version = codex-cli 0.20.0

VincentPestana avatar Aug 09 '25 21:08 VincentPestana

same "Python was not found" issue:

Image

raulblanko avatar Aug 09 '25 21:08 raulblanko

Just go to the directory that you have python installed, copy python.exe and paste it into the same folder renamed to python3.exe

insane66613 avatar Aug 09 '25 22:08 insane66613

Just go to the directory that you have python installed, copy python.exe and paste it into the same folder renamed to python3.exe

This worked! Thank you!

SinkHoleLabs avatar Aug 09 '25 22:08 SinkHoleLabs

Just go to the directory that you have python installed, copy python.exe and paste it into the same folder renamed to python3.exe

Thanks a lot! It works.

raulblanko avatar Aug 10 '25 08:08 raulblanko

Just go to the directory that you have python installed, copy python.exe and paste it into the same folder renamed to python3.exe

this worked for me too

kirtspaulding avatar Aug 10 '25 19:08 kirtspaulding

Just go to the directory that you have python installed, copy python.exe and paste it into the same folder renamed to python3.exe

Thank you! it works.

Pinkaru avatar Aug 11 '25 00:08 Pinkaru