Open neo-xy opened 5 months ago
I found a few problems with this issue:
Hi @exaby73 yes, I did - and the big thing that is missing there (that I noticed just yesterday) is that one have to run pip freeze -> requirements.txt
FROM /fanctions directory before firebase deploy
- which is missing in documentation (at least of what can I see). at the same time so still don't understand why "firebase init" in the attached youtube video creates "venv" but when I run it it does not ....
I see the venv
folder being generated under functions/venv
on running firebase init
and choosing Python. I'm using version 13.11.4
of the CLI. Make sure you have your CLI updated by running npm install -g firebase-tools@latest
For the love of anything that is holy and unholy can anyobdy explain how correctly to set up firebase-functions with Python?! π€π (tested everything that I found on stackoverflow and chatGpt/gemini to set it up but one error just leads to another and I just spinning in the circles for 3 days now -.-) At this point I abandon to build it localy and trtying to use "project idx" instead (as my local envirment is trash at this point after all AI sugestions).
my current steps:
create "blank workspace"
run firebase init functions-> that create "functions" folder as it should but no "vevn" is created (and because of that no dependecies are installed)-> not case for the guy in this video :/ -> https://www.youtube.com/watch?v=mvEHYMsk_AE&t=202s
cd functions ->
python3 -m venv venv
-> pick "python3" in list (as sugest by gemini) -> instalation completedadding "pkgs.python3" to dev.nix -> packeges
test runing
firebase init
again to install missing dependecies (now when I have venv in functions) but getting error: Requirement already satisfied: pip in ./venv/lib/python3.11/site-packages (24.0) /bin/sh: line 1: python3.12: command not foundso bc of that I go to dev.nix and change in packages from "pkgs.python3" to "pkgs.python312" (keep in mind that docs says that python 3.10 and 3.11 are supported)
run firebase init again and only now all the dependecies are installed
I can now deploy functions as well BUT let's say that I want to add
numpy
library to project:when in "/functions" directory :
source venv/bin/activate
pip install numpy -> python311Packages.pip
import numpy to the project, ex:
then I tested some things to fix that error (founded on stackoverflow and AIs but nothing helped/leaded to som eother errors) It's just like there is no wining with this s*** π«
(please keep in mind that I'm not a python developer and for all Python pros that is maybe a silly fix-although I ask some of my colleagues that code in python and they could not fix it for me:/ )