# AWS lambda, cannot import name 'etree' from 'lxml'

**URL:** <https://forum.serverless.com/t/aws-lambda-cannot-import-name-etree-from-lxml/10026>\
**Category:** Serverless Framework\
**Tags:** aws, lambda\
**Created:** [December 6, 2019, 8:26am UTC](https://forum.serverless.com/t/aws-lambda-cannot-import-name-etree-from-lxml/10026 "2019-12-06T08:26:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![GRyabkin](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/gryabkin/32/3810_2.png) [@GRyabkin](https://forum.serverless.com/u/GRyabkin)\
**Post date:** [December 6, 2019, 8:26am UTC](https://forum.serverless.com/t/aws-lambda-cannot-import-name-etree-from-lxml/10026/1 "2019-12-06T08:26:00Z")

</div>

After uploading and running lambda function I receive the following error:

```auto
{
  "errorMessage": "cannot import name 'etree' from 'lxml'
 (/var/task/lxml/ __init__.py)",
  "errorType": "ImportError",
  "stackTrace": [

```

My `serverless.yml` has the following settings applied:

```auto
custom:
  pythonRequirements:
    dockerizePip: true
    dockerFile: Dockerfile

plugins:
  - serverless-python-requirements

```

I have lxml installed in my `venv` (`requirements.txt` file)

I tried to check package using `sls package -> zipinfo` commands and I see that `lxml` on board  
I work under OS-X environment

Any help with this?

---

<div class="post-metadata">

**Author:** ![firstprayer](https://avatars.discourse-cdn.com/v4/letter/f/b782af/32.png) [@firstprayer](https://forum.serverless.com/u/firstprayer)\
**Post date:** [September 7, 2020, 9:45pm UTC](https://forum.serverless.com/t/aws-lambda-cannot-import-name-etree-from-lxml/10026/2 "2020-09-07T21:45:32Z")

</div>

Did you figure this out? I ran into the same issue.
