pycharm debugging window can't find node

Viewed 21

Node installed ok on my system. As proof, the result of the which node command gives /usr/bin/node and I have a script myapp.js which runs in the OS Terminal window just fine. The OS is Linux Ubuntu. So the command node myapp.js works just fine.

However, in pycharm, if I debug a file containing this:

import subprocess

subprocess.call('/usr/bin/node', shell=True)

I get:

/usr/bin/python3.9 /app/pycharm/plugins/python-ce/helpers/pydev/pydevd.py --multiprocess --qt-support=auto --client 127.0.0.1 --port ***** --file {removed for my privacy}

/bin/sh: line 1: /usr/bin/node: No such file or directory

In fact, if I replace node with sudo, I get the same type of "not found" error. I feel like I have tried every answer about subprocess not finding paths, but perhaps not.

In contrast, ls works just fine in the Pycharm debugging window.

I'm thinking my interpreter settings are wrong for this task, but I don't know how to fix it. My guess is that I'm in some little virtual environment that is sandboxed inside pycharm and doesn't see anything outside pycharm. But that's just a guess.

Note about node.js pycharm plugin: I have the pycharm Community Edition (the free edition), and my ultimate goal is to use it to call and monitor results from inside Python of a certain node.js API which I am interested in and for some reason they built it with node.js. Since I have the free edition, I can't install the Node.js plugin, I am pretty sure, because that's a premium only feature.

0 Answers
Related