Posts

Python Virtual Environment Concept

Image
 Virtual Environment: A virtual Environment is Python Environment where you installed all the Python Packages, Libraries and interpreter. Virtual Environment is an isolated environment means package installed inside this virtual environment not available outside the system.  Why We Need Virtual Environment: 1. There is multiple projects working on your system and each project have their different dependency. So you don't want mix -up dependency with  each other. e.g. You need different version of Pandas or requests for projects. 2. When you installed Package without using the Virtual Environment , it directly installed in your system. It may crash your laptop or add virus in your system. e.g. My practical experience I  have installed the package and laptop crash. How to Create Virtual Environment in Python: Command: python3 -m venv <Name of virtual environment> python3 -m venv myenv Explaination: python3 : Here we are using the Python3 version to creating the v...

Python Requests Modules

 Requests Module: Request Module is used for sending the HTTP request means its simplify the way to send the data to HTTP request and handles back the response. By using request method you can perform the CRUD operation easily. HTTP request methods are  GET, POST, PUT, PATCH, and DELETE. Installation of Requests Modules: By pip: pip install requests By Cloning the source code: git clone git://github.com/psf/requests.git After download the package , you have to copy the package inside your package directory then  cd requests pip install Ways to check the Requests module successfully installed: 1. pip list -- This will list out all the module installed in your kernel. 2. pip freeze > requirements.txt -- This will write all the modules installed in your kernel to requirements.txt. Lets start Some practical in Jupyter Notebooks: checking Pip installed or not In [6]: pip Usage: c:\jupyter_note\virtual_jupter\scripts\python.exe -m pip <command...