Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deploy a nodejs app that uses python scripts on heroku

I have a basic nodejs app that works fine on its own on heroku, but I want to add a python script that nodejs will call that uses a numpy package. I have gotten it to work on my local host but I am struggling to get it to work on heroku as it does not recognise the numpy package and I cannot seem to install it with pip as it does not get recognised either.

like image 264
Kobus Marais Avatar asked Jan 21 '26 02:01

Kobus Marais


1 Answers

All I had to do was add a requirements.txt file to my project and run: heroku buildpacks:add --index 1 heroku/python -a appname

like image 92
Kobus Marais Avatar answered Jan 23 '26 18:01

Kobus Marais



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!