Skip to content
This repository has been archived by the owner on Jan 15, 2023. It is now read-only.

Python3.6 image version of awscli doesn't work #34

Closed
dschep opened this issue May 4, 2017 · 5 comments
Closed

Python3.6 image version of awscli doesn't work #34

dschep opened this issue May 4, 2017 · 5 comments

Comments

@dschep
Copy link

dschep commented May 4, 2017

[:~] $ sudo docker run --rm -it lambci/lambda:build-python3.6 aws
[sudo] password for dschep: 
Traceback (most recent call last):
  File "/usr/bin/aws", line 19, in <module>
    import awscli.clidriver
  File "/usr/lib/python2.7/dist-packages/awscli/clidriver.py", line 32, in <module>
    from awscli.help import ProviderHelpCommand
  File "/usr/lib/python2.7/dist-packages/awscli/help.py", line 20, in <module>
    from docutils.core import publish_string
  File "/var/runtime/docutils/core.py", line 246
    print('\n::: Runtime settings:', file=self._stderr)
                                         ^
SyntaxError: invalid syntax
[:~] $ sudo docker run --rm -it lambci/lambda:build-python2.7 aws
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: too few arguments

My work around for now is to remove the existing entrypoint at /usr/bin/aws and reinstall with pip3

[:~] $ sudo docker run --rm -it lambci/lambda:build-python3.6 bash -c "rm /usr/bin/aws && pip3 install awscli > /dev/null && aws"
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: the following arguments are required: command
@mhart
Copy link
Member

mhart commented May 4, 2017

Hmmm, that's annoying. Perhaps the pip3 install option is the best solution – let me look into it.

@mhart
Copy link
Member

mhart commented May 4, 2017

I don't think you need to remove the existing one even (the python3.6 images have /var/lang/bin at a higher precedence in the PATH)

I think I'll just add this to the build-python3.6 image – probably along with the missing header files: #32 (comment)

@mhart mhart closed this as completed in cec61fa May 4, 2017
@mhart
Copy link
Member

mhart commented May 4, 2017

Added this – thanks for the nudge 👍

Will probably take a while before the images are updated, can check progress here: https://hub.docker.com/r/lambci/lambda/builds/

@dschep
Copy link
Author

dschep commented May 4, 2017

Awesome! Thanks for the quick update 🙂

@mhart
Copy link
Member

mhart commented May 4, 2017

Build done. Confirmed that docker run lambci/lambda:build-python3.6 aws --version works as expected

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

No branches or pull requests

2 participants