firebase / firebase/firebase-tools
Functions Python version conflict 3.12 and 3.11
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.3k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 84
Description
### [REQUIRED] Environment info
**firebase-tools: 13.3.0**
**Platform: macOS, Ubuntu (Github Actions)**
### [REQUIRED] Test case
Fresh Python functions project with both Python 3.11 and 3.12 installed
### [REQUIRED] Steps to reproduce
1. Start a new (or use existing) Firebase project and init Python functions
2. Install Python 3.12
3. Build the venv
4. Install pip requirements (firebase-functions, firebase-admin)
5. Build a function
6. Attempt to run the emulators and it complains that you're not using Python 3.11
```
Failed to load function definition from source: FirebaseError: Failed to find location of Firebase Functions SDK. Did you forget to run '. "/venv/bin/activate" && python3.11 -m pip install -r requirements.txt'?
```
7. Install Python 3.11
8. Build the venv using 3.11
9. Install pip requirements using 3.11
10. Emulators run
11. Attempt to deploy the functions and it complains that you're not using Python 3.12
```
Error: Failed to find location of Firebase Functions SDK. Did you forget to run '. "/venv/bin/activate" && python3.12 -m pip install -r requirements.txt'?
```
### [REQUIRED] Expected behavior
Emulators should work with Python 3.12 and deploy should work with Python 3.11 when both are installed.
### [REQUIRED] Actual behavior
Emulators fail to start the Python functions if the venv was setup using 3.12
Deploy fails when venv was setup using 3.11 if 3.12 is also installed
Contributor guide
Assessment
This issue has not been assessed yet.