---
title: Managing Python Dependencies in Serverless - Best Software Development Team Extension Partner for Nordics
description: In order to run the following commands, you need to have a Ubuntu (or any other Debian-based) work environment up and running!
---

[Blog - Trusted Team Extension Partner For Europe & USA](https://www.craftsmensoftware.com/blog)

# [Managing Python Dependencies in Serverless - Best Software Development Team Extension Partner for Nordics](https://www.craftsmensoftware.com/blog/managing-python-dependencies-in-serverless)

 Written by [Saimon hossain](https://www.craftsmensoftware.com/blog/author/saimon-hossain) | 03/10/2023

## Prerequisites

In order to run the following commands, you need to have a Ubuntu (or any other Debian-based) work environment up and running!

## STEPS

1. **Upgrade pip and virtaulenv**  
   Run the following commands:`sudo -H pip3 install --upgrade pip sudo -H pip3 install virtualenv` 
     - Then we need to create a virtaulenv
   
   `python3 -m venv your_venv`
   
     - Now we have to activate it.
   
   `source your_venv/bin/activate`
   
     - Install all the dependencies specified in the `requirements.txt` file
   
   `pip install -r requirements.txt`

1. **Install the Serverless Python Requirements Plugin**`sls plugin install -n serverless-python-requirements`This will automagically add the plugin to the `serverless.yml` file`plugins: - serverless-python-requirements` 
     - To make the package of python dependencies, run
   
   `sls package`
   
     - Now deploy it to AWS
   
   `sls deploy`All okay? Boom!

[View full post](https://www.craftsmensoftware.com/blog/managing-python-dependencies-in-serverless)

```json
{
  "@context" : "http://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Saimon hossain"
  },
  "dateModified" : "2026-04-30T09:55:02.057Z",
  "datePublished" : "2023-10-03T22:30:00Z",
  "headline" : "Managing Python Dependencies in Serverless",
  "image" : {
    "@type" : "ImageObject",
    "height" : 347,
    "url" : "https://144957314.fs1.hubspotusercontent-eu1.net/hubfs/144957314/Imported_Blog_Media/35_Managing_Python_Dependencies_In_Serverless-1.webp",
    "width" : 618
  },
  "mainEntityOfPage" : "https://www.craftsmensoftware.com/blog/managing-python-dependencies-in-serverless",
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "height" : 60,
      "url" : "/hs/hsstatic/content_shared_assets/static-1.4092/img/default-amp-logo.png",
      "width" : 60
    },
    "name" : "Blog"
  }
}
```