Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing the multiarray numpy extension module failed #239

Closed
baileyspace opened this issue Feb 14, 2017 · 4 comments
Closed

Importing the multiarray numpy extension module failed #239

baileyspace opened this issue Feb 14, 2017 · 4 comments

Comments

@baileyspace
Copy link

baileyspace commented Feb 14, 2017

I've tried adding various numpy configurations to the vendor directory to get numpy up and running (installing numpy in a virtualenv on an ec2 instance and downloading the resulting /usr/lib64/atlas-sse3/ and numpy directories, using the numpy and lib directories from this docker build https://github.com/ryansb/sklearn-build-lambda, and using this precompiled version https://github.com/Miserlou/lambda-packages/tree/master/lambda_packages) but I'm consistently getting this error message in cloudwatch:

Unable to import module 'app': Importing the multiarray numpy extension module failed. Most likely you are trying to import a failed build of numpy. If you're working with a numpy git repo, trygit clean -xdf(removes all files not under version control). Otherwise reinstall numpy.
@baileyspace baileyspace changed the title Using numpy in vendor directory Importing the multiarray numpy extension module failed Feb 14, 2017
@baileyspace
Copy link
Author

In the vendor file I've been including the numpy directory as well as a lib directory that includes libatlas.so.3, libcblas.so.3, libclapack.so.3
libf77blas.so.3, libgfortran.so.3, liblapack.so.3, libptcblas.so.3, libptf77blas.so.3, and libquadmath.so.0.

I decided to try making the endpoint return the directory structure of the lambda package as json. I can see that the numpy directory is included in the root directory but the lib directory isn't showing up.

When you add/remove files from the vendor directory, are those changes reflected after each deploy?

@baileyspace
Copy link
Author

I needed to install the newest version of Chalice from github; the one at PyPI doesn't include the vendor updates.

@jamesls
Copy link
Member

jamesls commented Feb 23, 2017

v0.6.0 has now been released that includes support for the vendor/ directory. Would you mind upgrading and seeing if you're still having issues?

@baileyspace
Copy link
Author

This is working v0.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants