Create a python virtual environment
To create a python virtual environment on Unix or Mac OS, open the terminal and execute the following commands:
$ mkdir whatsapp-bot
$ cd whatsapp-bot
$ python3 -m venv whatsapp-bot-venv
$ source whatsapp-bot-venv/bin/activate
(whatsapp-bot-venv) $ pip install twilio flask requests
To create a python virtual environment on Windows, open the command prompt and execute the following steps:
$ mkdir whatsapp-bot
$ cd whatsapp-bot
$ python3 -m venv whatsapp-bot-venv
$ whatsapp-bot-venvScripts\activate
(whatsapp-bot-venv) $ pip install twilio flask requests
The pip command is a package installer that installs the following 3 packages:
- Twilio Python helper library (for the Twilio API)
- Flask framework(to create a web application)
- Requests package (to access third party APIs)
After the successful installation of packages, we can move to the next step!
5
