How to run Python code on Google Colaboratory Last Updated : 04 Apr, 2023 Comments Improve Suggest changes Like Article Like Report Prerequisite: How to use Google Colab Google provides Jupyter Notebook like interface to run Python code on online Virtual Machines. In this article, we will see how to run simple Python code on Google Colab. Step #1: Open https://colab.research.google.com/ Step #2: Select New Python3 Notebook Step #3: Start Typing code into the code cells. Import all necessary libraries. Step #4: To add new cell, click on Insert->Code Cell Step #5: To run a particular cell, select the cell and press Ctrl + ENTER keys. Code cells under processOutput after successful runInstalling any particular module - We might need to install some external modules while working on some projects in Google Colab. By default not all the required modules are being pre-installed in Google Colab. So how can we install them using pip command ? Step - 1 : Open a new blank code cell. Step - 2 : Try to import that module and check if it is pre-installed or not. Here I am trying to import the Streamlit module which doesn't come pre-installed in collab. So we need to install it externally using pip. Step - 3 : Now we will install our required missing module/package using the following syntax. !pip install <module_name> Step 4 : After successful execution of the cell try to reimport it or run the previous cell to check if it has installed properly or not. Now we can see the green check mark on the left side of the cell , which indicates it has executed properly without any error and the module has been installed properly. Comment More infoAdvertise with us Next Article How to run Python code on Google Colaboratory R RaunakKondiboyina Follow Improve Article Tags : Python Programs Machine Learning python Practice Tags : Machine Learningpython Similar Reads How to Scrape Web Data from Google using Python? Prerequisites: Python Requests, Implementing Web Scraping in Python with BeautifulSoup Web scraping is a technique to fetch data from websites. While surfing on the web, many websites donât allow the user to save data for personal use. One way is to manually copy-paste the data, which both tedious a 2 min read Download Anything to Google Drive using Google colab When we download/upload something from a cloud server, it gives more transfer rate as compared to a normal server. We can use Google Drive for storage as well as fast speed download. The problem is how to upload something to G-Drive direct from Internet. So, Here we will see a solution to upload any 2 min read Python | Automate Google Search using Selenium Google search can be automated using Python script in just 2 minutes. This can be done using selenium (a browser automation tool). Selenium is a portable framework for testing web applications. It can automatically perform the same interactions that any you need to perform manually and this is a sma 3 min read How to Install Selenium in Python? Selenium Scripts are built to do some tedious tasks that can be automated using headless web browsers. For example, Searching for some Questions on Different Search engines and storing results in a file by visiting each link. This task can take a long for a normal human being but with the help of se 4 min read Build a Debian package(.deb) from your Python Program Creating a Debian package (.deb file) for the Python program allows for easier distribution and installation on the Debian-based systems. Here's a step-by-step guide on how to create a .deb file for the Python program:Build a Debian package(.deb) from your Python ProgramCreating a Debian package for 2 min read Like