Search code examples
pythonrubyherokupipyoutube-dl

Heroku not installing requirements.txt contents in Ruby/Python app


This is a weird case. I am using Ruby/Sinatra to develop an API and I use pip/python only to install youtube-dl.

I created a new Heroku app with heroku create command and added heroku/ruby and heroku/python buildpacks.

My /download endpoint uses youtube-dl CLI. When I make a call to that endpoint, on my app's Heroku logs I can see a message saying "youtube-dl: not found".

I specified in my requirements.txt file to install youtube-dl and ffmpeg. The file looks like this:

youtube-dl
ffmpeg

When I try to download it manually by running heroku run pip3 install -r requirements.txt it says that pip3 command can't be found. I tried pip instead of pip3 as well.

I am not that experienced in Heroku so I don't know if this is even possible. What are my options here?


Solution

  • I fixed it by adding runtime.txt file inside of my project. It contains my Python version:

    python-3.8.2