Project Setup

During the development of the project, we'll come across various modules and external libraries. Let's learn and install them. But before we install them, let's create a virtual environment and activate it.

 We are going to create a virtual environment using virtualenv. Python now ships with a pre-installed virtualenv library. So, to create a virtual environment, you can use the below command:

$ python -m venv env

The above command will create a virtual environment named env. Now, we need to activate the environment using the command:

$ . env/Scripts/activate
 

To verify if the environment has been activated or not, you can see (env) in your terminal. Now, we can install the libraries.

  1. pyttsx3: pyttsx is a cross-platform text to speech library which is platform-independent. The major advantage of using this library for text-to-speech conversion is that it works offline. To install this module type the below command in the terminal.

    $ pip install pyttsx3
     
  2. SpeechRecognition: It allows us to convert audio into text for further processing. To install this module type the below command in the terminal.
    $ pip install SpeechRecognition
     
  3. pywhatkit: It is an easy-to-use library that will help us interact with the browser very easily. To install the module, run the following command in the terminal.
    $ pip install pywhatkit
     
  4. wikipedia: It is used to fetch a variety of information from the Wikipedia website. To install this module type the below command in the terminal.
    $ pip install wikipedia
     
  5. requests: It is an elegant and simple HTTP library for Python that allows you to send HTTP/1.1 requests extremely easily. To install the module, run the following command in the terminal:
    $ pip install requests
     


.env File

We need this file to store some private data such as API Keys, Passwords, etc related to the project. For now, let's store the name of the user and the bot.

Create a file named .env and add the following content there:

USER=Ashutosh
BOTNAME=JARVIS

To use the contents from .env file, we'll install another module called python-decouple as:

$ pip install python-decouple
 

Learn more about Environment Variables in Python here.

Discussion
i am finding error in this line from functions.online_ops import find_my_ip which package i need to install to get rid of it

functions.online_ops could not be resolved error please give solution🙏

7

2