node.js 下载官网:下载 | Node.js 中文网
建议下载 xxx.msi,他会再安装时自动配置环境变量
linux 环境可以用 apt-get install nodejs 命令进行安装

node -v 显示安装的 nodejs 版本npm -v 显示安装的 npm 版本
4.基本利用
import execjsinp=input('须要加密的内容')#读取js文件的内容with open('weixin.js', 'r', encoding='utf-8') as f: js_code = f.read()#通过execjs.compile()进行编译js文件内容compile_result=execjs.compile(js_code)# 调用js文件传参#weixin是js中的function方法名,inp是穿的参result = compile_result.call('weixin', inp)print(result)