I have a Heroku app that's running Node, but I need to be able to run Python scripts on this server. I'm trying to install my Python dependencies but can't get it to work.
I've added both python and node build packs to my project, I've create a virtual environment and successfully installed requirements.txt, but I continue to get module not found errors.
How can I properly install Python packages on a Heroku Node server?
Heroku shows that I have correctly set both buildpacks:
heroku buildpacks --app <my app>
Outputs:
1. heroku/nodejs
2. heroku/python
If I try to install requirements.txt:
$ pip install -r requirements.txt
It says the requirements are already satisfied. I'm guessing this is in reference to my local environment.
Requirement already satisfied (use --upgrade to upgrade): requests==2.7.0 in /Library/Python/2.7/site-packages (from -r requirements.txt (line 1))
Requirement already satisfied (use --upgrade to upgrade): beautifulsoup4==4.5.3 in /Library/Python/2.7/site-packages (from -r requirements.txt (line 2))
But if I try to run my Python script, I get a no module error:
Traceback (most recent call last): File "Webcrawler.py", line 3, in from urllib.request import urlopen ImportError: No module named request