You can create an additional file in the .ebextensions folder, which installs the necessary libraries using yum. The term key (AWS) you want to use is packages :
packages: yum: libxml2: [] libxml2-devel: [] libxslt: [] libxslt-devel: []
This instructs the deployment script to install these packages using yum when your application is first deployed.
It starts before processing the requirements.txt file, therefore, when lxml is specified to the Pp command, it must have the necessary libraries.
For more information, see the AWS documentation on Configuring Software on Linux Servers .
I believe the packages listed above are the only lxml requirements, but read the lxml online documentation carefully .
source share