1

I'm trying to follow the abbreviated GITHUB building instructions as shown here and here

git clone https://github.com/intelxed/xed.git xed
git clone https://github.com/intelxed/mbuild.git mbuild
cd xed
./mfile.py

The first three commands works fine. But when running the last one I get the following error:

$ ./mfile.py
/usr/bin/env: ‘python3’: No such file or directory

I've installed python version 3.11 to the following directory c:\python and have tried the following SO solution posted here.

[EDIT] I have discovered that when I navigate to the directory where mfile.py is located in Git Bash and run the command./mfile.py that its not python is that is executing (interpreting this file) its git-bash. Hope this helps :)

JkT
  • 103
  • 7

1 Answers1

0

Check first your %PATH% (in a regular CMD shell window): it must include C:\python, and you should be able to type python3 -V to test.

Then, in that same CMD, you can type bash and try again your command: the shebang should trigger python3.exe.

If not, copy C:\Python\python.exe to C:\Python\python3.exe and the shebang will work.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • VonC@ thank you. Sorry for the late reply. FirstLY the PATH environment variable does include c:\python and from the CMD prompt the following does not works $ python3 -V Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases. But the following does work: $ python -V Python 3.11.2 – JkT Mar 03 '23 at 13:26
  • VonC@ the following command also works from GIT-Bash: $ python.exe mfile.py. Why doesn't ./mfile.py not work ? – JkT Mar 03 '23 at 13:29
  • @JkT OK: for testing, can you copy `python.exe` as `python3.exe` in `C:\Python`, and try again you bash session? – VonC Mar 03 '23 at 13:49
  • VonC@ I followed your instructions and it worked! – JkT Mar 03 '23 at 14:10