brackets-integrated-development icon indicating copy to clipboard operation
brackets-integrated-development copied to clipboard

/bin/sh: python3: command not found

Open roubarbe opened this issue 10 years ago • 8 comments

I tried modifying the builder from "python" to "python3". Both exist in the global path.

"python" does work, but my project uses Python 3.4, which can be summoned in BASH using "python3".

Brackets was restarted but this message still pops up.

Thanks!

roubarbe avatar May 17 '14 22:05 roubarbe

Did you change the "cmd" field to use python3? Try using this for builder.json and do a close-restart on Brackets:

[ { "name": "PHP", "cmd": "php $FILE", "file_reg": "in( file)? (.+) on line", "line_reg": "on line ([0-9]+)", "msg_reg": "(.) in", "seperator": "\n" }, { "name": "JavaScript", "cmd": "node $FILE", "file_reg": "(.+):", "line_reg": "js:([0-9]+)", "msg_reg": "[0-9]+[ |\n]([\w\W]+)", "seperator": "todo" }, { "name": "Ruby", "cmd": "ruby $FILE", "file_reg": "^(.):[0-9]", "line_reg": ":([0-9]+):", "msg_reg": ":[0-9]+: (.)", "seperator": "\n" }, { "name": "Python", "cmd": "python3 $FILE", "file_reg": "(.)",", "line_reg": ", line ([0-9]+)", "msg_reg": ", line [0-9]+[ |\n]([\w\W]+)", "seperator": "[ ]*File "" } ]

jadbox avatar May 19 '14 21:05 jadbox

The "cmd" field was the only one modified.

Copy-pasted yours over mine, just to make sure... Then got an extension error for Integrated Development.

Removed the extension, reinstalled it and tried to paste/save/restart again, with the same result.

Then I only copy-pasted the last object (Python), saved/restart and had the same exact Extension Error.

Running the Python-builder object through a text comparator, here are the differences between what I have and what you suggested:

Line 3, as set by default when extension installed: "file_reg": "(.*)",",

Line 3, Suggested: "file_reg": "(.)",",

Line 5, default: "msg_reg": ", line [0-9]+[ |\n]*([\w\W]+)",

Line 5, Suggested: "msg_reg": ", line [0-9]+[ |\n]([\w\W]+)",

roubarbe avatar May 20 '14 13:05 roubarbe

Very odd, I'll look into it and also review the regex there.

jadbox avatar May 20 '14 16:05 jadbox

Try removing the extension, delete the extension folder, and get the latest 0.5.55 version. Let me know if it starts working again. Btw, the regex should be okay as it was.

jadbox avatar May 22 '14 05:05 jadbox

Same problem. Brackets might not be able to see my install of python 3.4. I'll recheck my global paths.

roubarbe avatar May 22 '14 12:05 roubarbe

Not sure if its relevant, but I'm having the same problem for Node. When running, I get:

/bin/sh: node: command not found

The node binary is definitely available. I even switched from bash to the sh shell on the command line and ran node, and it ran fine. Not really sure what is causing this.

bithooked avatar Oct 05 '14 06:10 bithooked

I'm also having the same problem with python3

Any news here?

basbebe avatar Feb 19 '15 10:02 basbebe

I also have the same problem. My python3 is in /usr/local/bin/python3. It looks like the PATH used by brackets does not contain /usr/local/bin/.

The patch is simple: use the full file name.

--- /var/folders/sg/t7kts8_n6j13n11r6_tgr36r0000gn/T//AKy03a_builder.json   2016-01-16 10:02:48.000000000 +0100
+++ builder.json    2016-01-16 10:02:45.000000000 +0100
@@ -25,7 +25,7 @@
     },
     {
         "name": "Python",
-        "cmd": "python $FILE",
+        "cmd": "/usr/local/bin/python3 $FILE",
         "file_reg": "(.*)\",",
         "line_reg": ", line ([0-9]+)",
         "msg_reg": ", line [0-9]+[ |\\n]*([\\w\\W]+)",

It would be nice to have the interpreters configurable in the brackets configuration file.

LudovicRousseau avatar Jan 16 '16 09:01 LudovicRousseau