# Python Lambda - Missing files

**URL:** <https://forum.serverless.com/t/python-lambda-missing-files/6905>\
**Category:** Serverless Framework\
**Tags:** aws, lambda\
**Created:** [January 6, 2019, 10:26am UTC](https://forum.serverless.com/t/python-lambda-missing-files/6905 "2019-01-06T10:26:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JohnBrown](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@JohnBrown](https://forum.serverless.com/u/JohnBrown)\
**Post date:** [January 6, 2019, 10:26am UTC](https://forum.serverless.com/t/python-lambda-missing-files/6905/1 "2019-01-06T10:26:31Z")

</div>

Hi. I’m using your serverless framework to help me package up dependencies for a python script I have which uses DLIB for some machine learning (facial property detection).

I can run it fine locally, but when I use your system to package up my project ready for Lambda I am met with missing file errors coming from lambda its self:

```
Unable to import module 'handler': libcblas.so.3: cannot open shared object file: No such file or directory

```

On this note, I have a feeling there are lots of missing files. Any ideas how I can get serverless to find all these dependencies? There’s a lot of them…

Any ideas what’s is going wrong?

---

<div class="post-metadata">

**Author:** ![JohnBrown](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@JohnBrown](https://forum.serverless.com/u/JohnBrown)\
**Post date:** [March 3, 2019, 4:42pm UTC](https://forum.serverless.com/t/python-lambda-missing-files/6905/2 "2019-03-03T16:42:08Z")

</div>

I still need help with this. Any ideas?

---

<div class="post-metadata">

**Author:** ![mk11235](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/mk11235/32/3748_2.png) [@mk11235](https://forum.serverless.com/u/mk11235)\
**Post date:** [October 30, 2019, 4:15am UTC](https://forum.serverless.com/t/python-lambda-missing-files/6905/3 "2019-10-30T04:15:19Z")

</div>

> [@JohnBrown](#):
>
> lp me package up dependencies for a python script I have which uses DLIB for some machine learning (facial property detection).
> 
> I can run it fine locally, but when I use your system to package up my project ready for Lambda I am met with missing file errors coming from lambda its self:

If you’re using serverless-python-requirements to package dependencies, it unfortunately does not bundle in the dynamic libraries required.

You have to build them in an environment that lambda functions use such as amazonlinux and bundle it.

But you can provide a custom Dockerfile to serverless-python-requirements and make it work

Here’s an example of tesseract library Dockerfile  
[https://github.com/bweigel/aws-lambda-tesseract-layer/blob/master/Dockerfile](https://github.com/bweigel/aws-lambda-tesseract-layer/blob/master/Dockerfile)
