I am running python 3.9 on Windows.
print(sys.path)
currDir = os.getcwd()
currDir += "\node"
sys.path.append(currDir)
print(sys.path)
I see the 2nd print out of sys.path
has my c:\working\node\
But my issue is when I run the command under c:\working\node\
, e.g. npm install
p = subprocess.Popen(["npm.cmd", "install]),
I get error saying 'The system cannot find the file specified'
And after my script is run , I try 'echo %PATH%', I don't see c:\working\node\
in the %PATH% varaible too?
Can you please tell me how can I add a new directory to system path variable so that subprocess.Popen
can see the new addition?