开发者

Python: Existing environment variables which need to be added again to execute

开发者 https://www.devze.com 2023-01-21 19:35 出处:网络
I\'m trying to execute a command which runs a program that uses perl and python. Although both of them are already in PATH, I get this error \'perl\' is not recognized as an internal or ex开发者_如何学

I'm trying to execute a command which runs a program that uses perl and python. Although both of them are already in PATH, I get this error 'perl' is not recognized as an internal or ex开发者_如何学编程ternal command,operable program or batch file. 'python' is not recognized as an internal or external command,operable program or batch file. So I tried os.putenv('PATH', dir) but only one was taken in.


So try

os.putenv('PATH', dir + ";" + otherdir)
0

精彩评论

暂无评论...
验证码 换一张
取 消