How to Install Pyrebase4 on Windows?

Python Pyrebase4 Library:
Pyrebase4 is a Python library for interacting with Google Firebase. Firebase offers its users a variety of services such as authentication, database hosting, and so on. Because Firebase was built mostly in JavaScript, the Pyrebase4 library was designed to help Python developers.

Install Pyrebase4 on Windows

Now, let us see how to install Pyrebase4 on Windows here.

Install of Python Pyrebase4 library on Windows
To install the Pyrebase4 library on Windows, follow the steps below:

Step 1: Determine whether Python is installed on your Windows PC. So, open the PowerShell/cmd terminal(command prompt) and enter the following command.

python –version

If you don’t have Python installed, then install it.

Output:

Setting path and checking python version

C:\Users\cirus\Desktop\pyrebase4>python --version
Python 3.10.4

Step 2: To build/create a virtual environment, type the below command into your cmd terminal window.

virtualenv pyrebaseEnv

Step 3: Using the following command, we will now activate the virtual environment that we just created.

.\pyrebaseEnv\Scripts\activate

virtual environment

Step 4:Use the below command to install the Pyrebase4 library in this environment.

pip install Pyrebase4

Full Output:

C:\Users\cirus\Desktop\pyrebase4>pip install virtualenv
Collecting virtualenv
Downloading virtualenv-20.14.1-py2.py3-none-any.whl (8.8 MB)
---------------------------------------- 8.8/8.8 MB 4.8 MB/s eta 0:00:00
Collecting filelock<4,>=3.2
Downloading filelock-3.7.0-py3-none-any.whl (10 kB)
Collecting platformdirs<3,>=2
Downloading platformdirs-2.5.2-py3-none-any.whl (14 kB)
Requirement already satisfied: six<2,>=1.9.0 in c:\users\cirus\appdata\local\programs\python\python310\lib\site-packages (from virtualenv) (1.16.0)
Collecting distlib<1,>=0.3.1
Downloading distlib-0.3.4-py2.py3-none-any.whl (461 kB)
---------------------------------------- 461.2/461.2 KB 7.3 MB/s eta 0:00:00
Installing collected packages: distlib, platformdirs, filelock, virtualenv
Successfully installed distlib-0.3.4 filelock-3.7.0 platformdirs-2.5.2 virtualenv-20.14.1

C:\Users\cirus\Desktop\pyrebase4>virtualenv pyrebaseEnv
created virtual environment CPython3.10.4.final.0-64 in 51081ms
creator CPython3Windows(dest=C:\Users\cirus\Desktop\pyrebase4\pyrebaseEnv, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=C:\Users\cirus\AppData\Local\pypa\virtualenv)
added seed packages: pip==22.0.4, setuptools==62.1.0, wheel==0.37.1
activators BashActivator,BatchActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
Collecting Pyrebase4
Downloading Pyrebase4-4.5.0-py3-none-any.whl (8.9 kB)
Collecting pycryptodome>=3.6.4
Downloading pycryptodome-3.14.1-cp35-abi3-win_amd64.whl (1.8 MB)
---------------------------------------- 1.8/1.8 MB 5.1 MB/s eta 0:00:00
Collecting requests-toolbelt>=0.7.1
Downloading requests_toolbelt-0.9.1-py2.py3-none-any.whl (54 kB)
---------------------------------------- 54.3/54.3 KB 2.9 MB/s eta 0:00:00
Collecting gcloud>=0.18.3
Downloading gcloud-0.18.3.tar.gz (454 kB)
---------------------------------------- 454.4/454.4 KB 7.2 MB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Collecting requests>=2.19.1
Using cached requests-2.27.1-py2.py3-none-any.whl (63 kB)
Collecting python-jwt>=2.0.1
Downloading python_jwt-3.3.2-py2.py3-none-any.whl (6.8 kB)
Collecting oauth2client>=4.1.2
Downloading oauth2client-4.1.3-py2.py3-none-any.whl (98 kB)
---------------------------------------- 98.2/98.2 KB ? eta 0:00:00

Check whether Pyrebase4 library is installed or Not

1)Now let us check to see if the pyrebase library was successfully installed. So, in your terminal, enter the following command:

python

2)Importing the pyrebase4 library

import pyrebase

pyrebase imported

If we don’t see any issues after importing the library, it means the library was installed correctly and we can proceed to see its version.
If we notice any errors while importing the library, it implies the library was not installed properly.

pip show pyrebase4

Congrats! The Pyrebase4 library has been successfully installed on our system.