Category: Python

  • How to run Python 3 virtualenv in Ubuntu

    As best practice, whenever you have a new project in Python you should always run it in a virtual environment so that packages will not be installed globally that may affect system tools. The most common virtual environment for Python3 is virtualenv. By default, Python3 is already installed in Ubuntu, but virtualenv is not. The…

  • How to install pip3 in Ubuntu

    If you’ve installed Ubuntu recently, by default it comes with Python 3 installed. The issue is when you want to install a Python package, then you will need pip3.

  • Boto3 Response to JSON String in Python

    When working to programmatically check or configure your AWS infrastructure in Python, we need to use Boto3. Most of the time we will need to check the output of the Boto3 Client by printing it to the terminal. Unfortunately, printing directly the boto3 response is not really easy to understand. The best way to work…

  • Listing AWS Regions using boto3 Python

    If you want to programmatically retrieve the AWS regions one of the best ways to do this is via Python boto3 package. In boto3, specifically the EC2 client, there is a function named describe_regions. This will retrieve the regions that are in AWS. See different uses of the describe_regions function below. Basic code for retrieving…

  • How to run Python3 Virtualenv in PowerShell

    Below is a step-by-step instruction on how to run Python3 Virtualenv in PowerShell. The tutorial below assumes that you have already installed python3 and pip3 in your windows computer. Installation of virtualenv in Python3 In PowerShell, install virtualenv using python pip. Create a virtual environment Error when activating newly created virtual environment To activate the…