You'll need an API token to communicate with Telegram's servers. Follow the instructions here
python - m venv name_your_venv
This creates a virtual environment directory named name_your_venv
.
source name_your_venv/bin/activate
To confirm the virtual environment is activated, check the location of your Python interpreter:
which python
Once activated, your terminal prompt will usually change to indicate the active virtual environment:
(name_your_venv)user@machine:)
While the virtual environment is active, install the required packages using pip:
python -m pip install requests python-telegram-bot
Make sure you have replaced token
in monitoring_bot_v3.py
with your actual Telegram bot API token
python monitoring_bot_v3.py