I like @Hamada's answer above since it relies on the Firebase CLI:
To solve the issue, simply run
pip freeze > requirements.txt
then deploy :)
I just wanted to suggest that if you don't want to fully deploy your function (since you are still building it) you can instead use the Firebase CLI to call:
firebase init functions
This might seem weird, since you've already called it once to initialize your functions, but after choosing to Overwrite an existing codebase, this gives you a set of questions to which you carefully answer "No, don't overwrite my existing files" and then it offers to install your dependencies, to which you answer "Yes."
? Would you like to initialize a new codebase, or overwrite an existing one? Overwrite
? What language would you like to use to write Cloud Functions? Python
? File functions/requirements.txt already exists. Overwrite? No?
? File functions/main.py already exists. Overwrite? No?
? Do you want to install dependencies now? Yes
This should install the necessary packages (from requirements.txt
) into your venv without changing anything else in your project.