I have run into a similar issue. This is due to os compatibility issues. I am using a Mac. This has solved for me: pip install regex --platform=manylinux2014_x86_64 --only-binary=:all: --target ./create_layer/lib/python3.11/site-packages( The location of where you want to download the package)