简体   繁体   English

如何在heroku上部署的node.js应用程序上使用python包运行python脚本

[英]how to run python scripts with python packages on node.js app deployed on heroku

i have an nodejs app deployed on heroku, i want to run some python scripts which depends on some packages like selenium on nodejs app deployed on heroku. 我有一个部署在heroku上的nodejs应用程序,我想运行一些python脚本,这取决于部署在heroku上部署的nodejs app上的selenium等软件包。

i have read about npm packages like 'node-python' and 'pyshell' and i have tested on localhost using 'node-python' to run the python scripts and i have installed all the require packages using pip, but i dont know how can i run these scripts on nodejs app which is deployed on heroku and how can i install all the required packages on which these scripts are dependent. 我已经阅读了关于'node-python'和'pyshell'的npm软件包,我已经使用'node-python'测试了localhost来运行python脚本,我已经使用pip安装了所有需要的软件包,但我不知道怎么能我在部署在heroku上的nodejs app上运行这些脚本,如何安装这些脚本所依赖的所有必需软件包。 Thank you. 谢谢。

You need to create your package.json file. 您需要创建package.json文件。 That's where your app configuration and dependencies are defined. 这就是您的应用配置和依赖关系的定义。

https://devcenter.heroku.com/articles/deploying-nodejs https://devcenter.heroku.com/articles/deploying-nodejs

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM