Need to install Python module that have system dependencies
See original GitHub issueProblem
Unable to install Python modules that have system dependencies, such as mysqlclient, and there’s no faculty in this package to do so.
Suggested Solution
Add support for an optional pre-requirements shell script to be run. This shell script (which the end-user must write) must be able to both install system packages, and then copy any desired artifacts into the folder to get packaged. In my above instance, I would suggest something like…
pythonRequirements:
dockerizePip: true
preReqScript: install-mysql-devel.sh
and that shell script install-mysql-devel.sh
(in the same folder as serverless.yml) would contain…
#!/bin/bash
yum install -y mysql-devel
cp /usr/lib64/mysql/libmysqlclient.so.18.0.0 ./libmysqlclient.so.18
I’ll put a bounty on this feature of ~$100 either in money or stuff, your choice. I need this badly, and don’t have the time to make this feature right now. I will eventually implement this if no one’s free because I’ll need it and it will annoy me too much.
Issue Analytics
- State:
- Created 6 years ago
- Comments:19 (1 by maintainers)
@dschep Thanks for your suggestion. I created a custom image using
amazonlinux
image as a base image.Note: there is an issue with
MySQL-python
package andmysqlclient
package. So I usedPyMySQL==0.8.0
which solve my problem.Getting same issue as @jadhavmanoj , after updating the docker image as @dschep suggested, now I am getting this
Rpmdb checksum is invalid: dCDPT(pkg checksums): libsepol-devel.x86_64 0:2.1.7-3.12.amzn1 - u
is this issue related to https://forums.aws.amazon.com/thread.jspa?threadID=244745