JByteMod-Beta icon indicating copy to clipboard operation
JByteMod-Beta copied to clipboard

java.io.IOException: Cannot run program ""/usr/bin/python3""

Open xor-shift opened this issue 7 years ago • 5 comments

This error is produced when trying to use krakatau for bytecode editing with the provided python directory: /usr/bin/python3

The provided directory has no quotes in it and there is a file called python3 in /usr/bin/.

java.io.IOException: Cannot run program ""/usr/bin/python3"": error=2, No such file or directory
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
	at java.lang.Runtime.exec(Runtime.java:620)
	at java.lang.Runtime.exec(Runtime.java:450)
	at java.lang.Runtime.exec(Runtime.java:347)
	at me.grax.jbytemod.decompiler.KrakatauDecompiler.decompile(KrakatauDecompiler.java:45)
	at me.grax.jbytemod.decompiler.Decompiler.decompile(Decompiler.java:53)
	at me.grax.jbytemod.decompiler.Decompiler.run(Decompiler.java:41)
Caused by: java.io.IOException: error=2, No such file or directory
	at java.lang.UNIXProcess.forkAndExec(Native Method)
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
	at java.lang.ProcessImpl.start(ProcessImpl.java:134)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
	... 6 more


Please try setting the python path  

xor-shift avatar Jun 05 '18 11:06 xor-shift

Please try without /usr/bin (only "python3") as the path

GraxCode avatar Jun 07 '18 15:06 GraxCode

Now I'm getting the following:

	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
	at java.lang.Runtime.exec(Runtime.java:620)
	at java.lang.Runtime.exec(Runtime.java:450)
	at java.lang.Runtime.exec(Runtime.java:347)
	at me.grax.jbytemod.decompiler.KrakatauDecompiler.decompile(KrakatauDecompiler.java:45)
	at me.grax.jbytemod.decompiler.Decompiler.decompile(Decompiler.java:53)
	at me.grax.jbytemod.decompiler.Decompiler.run(Decompiler.java:41)
Caused by: java.io.IOException: error=2, No such file or directory
	at java.lang.UNIXProcess.forkAndExec(Native Method)
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
	at java.lang.ProcessImpl.start(ProcessImpl.java:134)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
	... 6 more


Please try setting the python path

xor-shift avatar Jun 09 '18 21:06 xor-shift

@Daswf852 where you ever able to correct this issue? I am experiencing this same issue now and I am not finding much documentation as to fixing it.

tegid77 avatar Jun 06 '19 13:06 tegid77

@tegid77 I ran into this problem now and found that my specific issue was that I had python 2.7 configured as my Python SDK in my project. It was resolved when I upgraded to python3.8

dean-vanwyk-impact avatar Sep 10 '20 11:09 dean-vanwyk-impact