# Numpy lambda error using serverless

**URL:** <https://forum.serverless.com/t/numpy-lambda-error-using-serverless/4325>\
**Category:** Serverless Framework\
**Tags:** aws, lambda\
**Created:** [April 22, 2018, 11:10pm UTC](https://forum.serverless.com/t/numpy-lambda-error-using-serverless/4325 "2018-04-22T23:10:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisevans\_au](https://avatars.discourse-cdn.com/v4/letter/c/4af34b/32.png) [@chrisevans\_au](https://forum.serverless.com/u/chrisevans_au)\
**Post date:** [April 22, 2018, 11:10pm UTC](https://forum.serverless.com/t/numpy-lambda-error-using-serverless/4325/1 "2018-04-22T23:10:06Z")

</div>

I’m on mac OSX and deploying a python lambda on AWS.

I have created a local env source venv/bin/activate following these instructions.

> **[How to Handle your Python packaging in Lambda with Serverless plugins](https://www.serverless.com/blog/serverless-python-packaging/)**
>
> Handling Python dependencies in your Lambda functions can be a pain. Here's how I handle Python packaging with Serverless for dev/prod parity.

I have installed all of the packages

```
$ pip install numpy

Requirement already satisfied: numpy in ./venv/lib/python3.5/site-packages (1.14.2)

```

then i deploy the package using

```
pip freeze > requirements.txt

serverless deploy 

```

**error when running on the lambda**

> START RequestId: ################### Version: $LATEST  
> Unable to import module ‘ **main** ’: Missing required dependencies [‘numpy’]

Also note: my code is not calling numpy, it’s calling quandl and quandl is calling numpy

**requirements.txt**

```
asn1crypto==0.24.0
certifi==2018.4.16
cffi==1.11.5
chardet==3.0.4
cryptography==2.2.2
idna==2.6
inflection==0.3.1
more-itertools==4.1.0
ndg-httpsclient==0.4.4
numpy==1.14.2
pandas==0.22.0
pyasn1==0.4.2
pycparser==2.18
pyOpenSSL==17.5.0
python-dateutil==2.7.2
pytz==2018.4
Quandl==3.3.0
requests==2.18.4
six==1.11.0
urllib3==1.22

```

---

<div class="post-metadata">

**Author:** ![bill](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/bill/32/1072_2.png) [@bill](https://forum.serverless.com/u/bill)\
**Post date:** [April 23, 2018, 11:30am UTC](https://forum.serverless.com/t/numpy-lambda-error-using-serverless/4325/2 "2018-04-23T11:30:10Z")

</div>

can you redo all steps within `virtualenv`?
