My team started having this exact same problem today, with the same library. Oddly enough, out of the ~10 repos we have that install that library in order to deploy, only one of them has gotten this error so far.
It’s very consistent, too-- every time we push to that one repo, it fails. Every time we push to the others we’re actively developing on, it succeeds. The build and deploy scripts are exactly the same for all these repos. They’re all microservices that get pushed into the exact same Amazon ECS cluster.
It’s worth noting that last week, this same repo started failing builds because python2.7-dev didn’t exist, when our other repos (again, using the same deploy scripts) didn’t have this problem. That’s why we added a line to install that package in the first place.