jadbox / brackets-integrated-development

IDE-like support for Brackets
49 stars 7 forks source link

/bin/sh: python3: command not found #1

Open roubarbe opened 10 years ago

roubarbe commented 10 years ago

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!

jadbox commented 10 years ago

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]+)", "msgreg": "(.) in", "seperator": "\n" }, { "name": "JavaScript", "cmd": "node $FILE", "file_reg": "(.+):", "line_reg": "js:([0-9]+)", "msgreg": "[0-9]+[ |\n]([\w\W]+)", "seperator": "todo" }, { "name": "Ruby", "cmd": "ruby $FILE", "filereg": "^(.):[0-9]", "line_reg": ":([0-9]+):", "msgreg": ":[0-9]+: (.)", "seperator": "\n" }, { "name": "Python", "cmd": "python3 $FILE", "filereg": "(.)\",", "line_reg": ", line ([0-9]+)", "msgreg": ", line [0-9]+[ |\n]([\w\W]+)", "seperator": "[ ]*File \"" } ]

roubarbe commented 10 years ago

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]+)",

jadbox commented 10 years ago

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

jadbox commented 10 years ago

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.

roubarbe commented 10 years ago

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

bithooked commented 10 years ago

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.

basbebe commented 9 years ago

I'm also having the same problem with python3

Any news here?

LudovicRousseau commented 8 years ago

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.