Open kairichard opened 4 years ago
When installing manylinux wheels with use_precompiled_packages set to true zappa only unzips the wheels ignoring purelib and platlib folders as specified in PEP491
manylinux
use_precompiled_packages
true
purelib
platlib
A correctly extracted wheel in the resulting lambda zip:
./tensorflow ./tensorflow/tools ./tensorflow/core ./tensorflow/python ./tensorflow/lite ./tensorflow/libtensorflow_framework.so.1 ./tensorflow/include ./tensorflow/_api ./tensorflow/__init__.py ./tensorflow/contrib ./tensorflow/examples ./tensorflow/compiler ./tensorflow-1.14.0.dist-info ./tensorflow-1.14.0.dist-info/RECORD ./tensorflow-1.14.0.dist-info/metadata.json ./tensorflow-1.14.0.dist-info/WHEEL ./tensorflow-1.14.0.dist-info/entry_points.txt ./tensorflow-1.14.0.dist-info/DESCRIPTION.rst ./tensorflow-1.14.0.dist-info/top_level.txt ./tensorflow-1.14.0.dist-info/METADATA
When inspecting the resulting lambda zip you can see the following folders:
./tensorflow-1.14.0.data ./tensorflow-1.14.0.data/purelib ./tensorflow-1.14.0.dist-info ./tensorflow-1.14.0.dist-info/RECORD ./tensorflow-1.14.0.dist-info/metadata.json ./tensorflow-1.14.0.dist-info/WHEEL ./tensorflow-1.14.0.dist-info/entry_points.txt ./tensorflow-1.14.0.dist-info/DESCRIPTION.rst ./tensorflow-1.14.0.dist-info/top_level.txt ./tensorflow-1.14.0.dist-info/METADATA
As a result, we get the following error when running the lambda function
No module named 'tensorflow'
I only tested it with tensorflow=1.14.0 but it seems like a general problem with all wheels that are purelibs as zappa only extracts them and does no further processing see -> https://github.com/Miserlou/Zappa/blob/master/zappa/core.py#L659
tensorflow=1.14.0
purelibs
Here is the whl -> tensorflow=1.14.9 from https://pypi.org/project/tensorflow/1.14.0/#files
Was the typo 'tensoflow' an accident?
'tensoflow'
@jneves aha oh gosh, yes that is a typo.
When installing
manylinux
wheels withuse_precompiled_packages
set totrue
zappa only unzips the wheels ignoringpurelib
andplatlib
folders as specified in PEP491Expected Behavior
A correctly extracted wheel in the resulting lambda zip:
Actual Behavior
When inspecting the resulting lambda zip you can see the following folders:
As a result, we get the following error when running the lambda function
Steps to Reproduce
I only tested it with
tensorflow=1.14.0
but it seems like a general problem with all wheels that arepurelibs
as zappa only extracts them and does no further processing see -> https://github.com/Miserlou/Zappa/blob/master/zappa/core.py#L659Here is the whl -> tensorflow=1.14.9 from https://pypi.org/project/tensorflow/1.14.0/#files