git clone https://github.com/AroraKaran19/Food-For-All
Skip this step if you already have Python 3.6+ on your system.
Download the latest version of Python for Windows from here
or
winget install -e -i --id=Python.Python.3 --source=winget --scope=machine
Python comes pre-installed on most Linux distributions. To check if you have it installed (and which version it is), open a terminal and type the following command:
python3 --version
On Ubuntu/Debian/Pop!_OS, you might need to install the python-is-python3
package to make /usr/bin/python
point to python3
instead of python2
. To install it, run the following command:
sudo apt install python-is-python3
It is recommended to use a virtual environment for development.
pip install -r requirements.txt
If you are on Linux, you need to install tkinter separately since Python installations on Linux don't come with tkinter by default.
# for Debian/Ubuntu
sudo apt-get install python3-tk
# for Fedora
sudo dnf install python3-tkinter
# for Arch Linux
sudo pacman -S tk
# for RHEL/CentOS
sudo yum install python3-tkinter
If you are MacOS and tkinter doesn't work visit this
- Create a new project on Firebase
- Go to Realtime Database and create a new database
- Copy the URL of the database and save it in a new file called
firebase_url.txt
- Go to Project Settings > Service Accounts select Python and click on Generate new private key. This will download a JSON file containing your service account key.
- Rename the downloaded JSON file to
key.json
- In the root directory of the project, create a new directory called
keys
and move the downloaded JSON file and thefirebase_url.txt
file into it. - You should be able to access the database from your Python code now.
python main.py