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

Popular posts from this blog

Receive udp packets in android gstreamer -

php - Extract Text from HTTP referer -

java - Callback from new thread to class from which thread was initiated -