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

Packager assumes Python2.7 #142

Closed
jarosser06 opened this issue Jun 8, 2017 · 1 comment
Closed

Packager assumes Python2.7 #142

jarosser06 opened this issue Jun 8, 2017 · 1 comment

Comments

@jarosser06
Copy link
Contributor

Right now the Packaging method looks for python2.7 in the virtualenv site packages. Since AWS Lambda now supports Python 3 we should update the code so Python3 Lambda Packages can be created as well.

@nephlm
Copy link

nephlm commented Jul 22, 2017

This bit me yesterday.

Runtime was set Python3.6 and it worked fine for several releases since many packages can be imported by python2 or 3, then I added a couple that had issues. I assumed I was building using python3, but I had just been getting lucky.

Changing the .json runtime to Python2.7 or hacking the hardcoded site-packages locations to point to 3.6 fixed the problems. I tried specifying --no-virtualenv or --virtualev=/path/python3/virtualenv which I thought would fix the issue, but had no luck. I wasn't very methodical about that, so I might not have had everything set up properly.

Now that lambda supports two python runtimes, should the packaging step indicate to the user which it is building for?

azatoth added a commit to azatoth/lambda-uploader that referenced this issue Apr 25, 2018
azatoth added a commit to azatoth/lambda-uploader that referenced this issue Apr 25, 2018
azatoth added a commit to azatoth/lambda-uploader that referenced this issue Apr 25, 2018
azatoth added a commit to azatoth/lambda-uploader that referenced this issue Apr 25, 2018
A issue has been that even if you specify python3.6 as runtime in lambda.json,
it will use python2 for the virtualenv and thus install possibly incompatible
libraries (psycopg2-binary for example)

This changes the behavour to use the defined "runtime" in lambda.json as
basis for the virtualenv.

Closes: rackerlabs#142
Relates: rackerlabs#152
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