1

I try to get Selenium Webdriver with headless Firefox to work on Heroku. I'm using Python 3.6.7 for that.

I found out that I can use this buildpack https://github.com/joshuawu/firefox-buildpack for launching my app. So I installed it using Heroku CLI by writing:

heroku config:add BUILDPACK_URL=https://github.com/joshuawu/firefox-buildpack/tree/master/bin

I also have requirements.txt file with all dependencies that I need, but after setting the buildpack I get following error:

Traceback (most recent call last):
File "main.py", line 3, in <module>
import requests
ImportError: No module named requests

Although requests library is listed in the requirements.txt file, it doesn't seem to matter after installing buildpack. How do I solve this problem?

1 Answers1

0

I'm assuming you've solved this problem by now. For others looking for an answer, using Pipfile and Pipfile.lock is the solution for ensuring packages are installed and also for specifying version of Python interpreter to install. See here for usage: https://stackoverflow.com/a/49867443

ACT
  • 56
  • 1