Home>
I want to create a Python deployment package on AWS Lambda in a Windows environment
Problem i am experiencinglxml is not recognized
Error message
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml.Do you need to install a parser library?
Applicable source code
BeautifulSoup (res.text, "lxml")
https://docs.aws.amazon.com/en_us/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html
Using this as a reference, create a package as follows
requirements.txt
PyMySQL
requests
bs4
lxml
mkdir -p package
cd package;py -m pip install -r ../requirements.txt --target.
cd package;zip -r9 ../deploy.zip pymysql requests chardet certifi idna bs4 soupsieve lxml
Make a package with
zip -g deploy.zip lambda_function.py settings.py
aws lambda update-function-code --function-name xxxxx --zip-file fileb: //deploy.zip
Deploy with
Is pip install on Windows?
Collecting lxml == 4.4.1
Using cached https://files.pythonhosted.org/packages/32/b0/0789ab7849fc55443eb6c87d866b10fb211d3c65c4cbc597bcf5d967a9a9/lxml-4.4.1-cp38-cp38-win_amd64.whl
I wonder if it's because the thing for Windows and Windows has been installed
Is there a way to install lxml for Amazon Linux on windows
Development environment is on Windows7 64bit MSYS
Lambda is python 3.7
-
Answer # 1
Related articles
- i want to install python370 on anaconda3
- python 3x - save the selected file to another folder
- python - i get an error when i type pip3 install scikit-learn
- python:i can't install wxpython
- python - if you enter pip3 install pillow, you will see something like this
- python - i can't install scikit-learn
- i want to put it in another variable with python for
- python - [macos] i can't install psycopg2
- about python pip install error
- i can't install cvxpy with python jupyter
- unable to install python library from github to google colab
- python - i want to install an older version of tensorflow-gpu
- python 3x - is there a way to install plotlypy in python other than pip?
- python - pip install git doesn't work
- npm install of a certain package is not done with react (typescript)
- python - i want to install apturl == 052
- python - unable to install twisted
- python - open another tab of selenium
- python 390 does not install properly
- python - how to use subscripts to represent the values of another list in a list
Related questions
- python : Error installing pyinstaller via pip
- python : Why is kivy not installing?
- python : Problem installing pytelegrambotapi module
- python : I get an error when running pip Install
- python : Visual Studio error "unresolved import 'PyAudio'"
- python : Can't install library: "module 'plistlib' has no attribute 'readPlist'"
- python : Error installing PyQt4 on PyCharm
- python 3.6.0 can't install pyinstaller
- python : I can't update pynq.
- Python pip connection problem (Retrying)
>Using cached https://files.pythonhosted.org/packages/32/b0/0789ab7849fc55443eb6c87d866b10fb211d3c65c4cbc597bcf5d967a9a9/lxml-4.4.1-cp38-cp38-win_amd64.whl
Because I search with lxml whl
https://pypi.org/project/lxml/#files
Since I got to a place called
Instead of lxml in requirements.txt
https://files.pythonhosted.org/packages/e7/a8/40115c84414c017e1a293f331709eb7534303d3ccd11ef805ac09b1481e7/lxml-4.4.1-cp37-cp37m-manylinux1_x86_64.whl
The URL
was installed successfully for Linux
It worked even after Lambda deployment
I don't know whl well
Is it like a package for pip install ...
Reference: https://aws.amazon.com/premiumsupport/knowledge-center/lambda-python-package-compatible/