python - Nvm not found when executing subprocess -
i trying execute simple command:
p = subprocess.popen("nvm use 0.12.7", cwd="../tags/" + "2.0.4", stdout=subprocess.pipe, shell=true) stdout, stderr = p.communicate() i'm getting:
/bin/sh: 1: nvm: not found i'm not sure why happening, works other commands normally, special nvm command?
your path variable seems not include location of 'nvm' program. variable contains list of directories operating system looks in when trying find location of program.
you should either add 'nvm' path using export path=$path:/path/to/nvm, adding via sys.path, or specify full path when run subprocess command.
Comments
Post a Comment