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

[CLI V2] awscli cannot be run via pipenv on windows #3627

Closed
troyready opened this issue Oct 4, 2018 · 4 comments
Closed

[CLI V2] awscli cannot be run via pipenv on windows #3627

troyready opened this issue Oct 4, 2018 · 4 comments
Assignees
Labels
closed-for-staleness feature-request A feature should be added or improved. installation p3 This is a minor priority issue response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. v2

Comments

@troyready
Copy link

On a fresh Python (tested in 2.7 and 3.6.6) install on windows with pipenv, attempting to run the cli generates a stacktrace:

PS C:\Users\Administrator\myprojectwithpipenv> pipenv run aws s3 ls
Traceback (most recent call last):
  File "c:\users\administrator\appdata\local\programs\python\python36\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\administrator\appdata\local\programs\python\python36\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Administrator\AppData\Roaming\Python\Python36\Scripts\pipenv.exe\__main__.py", line 9, in <module>
  File "C:\Users\Administrator\AppData\Roaming\Python\Python36\site-packages\pipenv\vendor\click\core.py", line 722, in
__call__
    return self.main(*args, **kwargs)
  File "C:\Users\Administrator\AppData\Roaming\Python\Python36\site-packages\pipenv\vendor\click\core.py", line 697, in
main
    rv = self.invoke(ctx)
  File "C:\Users\Administrator\AppData\Roaming\Python\Python36\site-packages\pipenv\vendor\click\core.py", line 1066, in
 invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\Administrator\AppData\Roaming\Python\Python36\site-packages\pipenv\vendor\click\core.py", line 895, in
invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\Administrator\AppData\Roaming\Python\Python36\site-packages\pipenv\vendor\click\core.py", line 535, in
invoke
    return callback(*args, **kwargs)
  File "C:\Users\Administrator\AppData\Roaming\Python\Python36\site-packages\pipenv\cli.py", line 701, in run
    do_run(command=command, args=args, three=three, python=python, pypi_mirror=pypi_mirror)
  File "C:\Users\Administrator\AppData\Roaming\Python\Python36\site-packages\pipenv\core.py", line 2253, in do_run
    do_run_nt(script)
  File "C:\Users\Administrator\AppData\Roaming\Python\Python36\site-packages\pipenv\core.py", line 2201, in do_run_nt
    p = subprocess.Popen([command] + script.args, **options)
  File "c:\users\administrator\appdata\local\programs\python\python36\lib\subprocess.py", line 709, in __init__
    restore_signals, start_new_session)
  File "c:\users\administrator\appdata\local\programs\python\python36\lib\subprocess.py", line 997, in _execute_child
    startupinfo)
OSError: [WinError 193] %1 is not a valid Win32 application

The CLI can be manually instantiated in the pipenv venv:

pipenv run python -c "import sys;import awscli.clidriver;sys.argv = ['aws', 's3', 'ls'];sys.exit(awscli.clidriver.main())"
<buckets are successfully listed here>
@dstufft dstufft added the bug This issue is a bug. label Oct 8, 2018
@dstufft
Copy link
Contributor

dstufft commented Oct 8, 2018

This is likely going to be a bug because of the lack of "real" CLI wrappers being generated for the CLI.

Marking as a bug.

@joguSD joguSD added the v2 label Oct 15, 2018
@joguSD
Copy link
Contributor

joguSD commented Oct 15, 2018

The changes required to our packaging to get this working could potentially cause issues in the current major version so we're targeting addressing this in V2.

@joguSD joguSD added enhancement and removed bug This issue is a bug. labels Oct 15, 2018
@joguSD joguSD changed the title awscli cannot be run via pipenv on windows [CLI V2] awscli cannot be run via pipenv on windows Oct 15, 2018
@diehlaws diehlaws added feature-request A feature should be added or improved. and removed enhancement labels Jan 4, 2019
@kdaily kdaily added the automation-exempt Issue will not be subject to stale-bot label Sep 17, 2020
@tim-finnigan tim-finnigan self-assigned this Nov 3, 2022
@tim-finnigan tim-finnigan added p3 This is a minor priority issue and removed automation-exempt Issue will not be subject to stale-bot labels Nov 3, 2022
@tim-finnigan
Copy link
Contributor

Checking in as there hasn't been any activity on this issue in a while. Are you still unable to run the AWS CLI via pipenv on Windows? And has anyone tried alternatives such as virtualenv? If you're still running into this issue please let us know which OS/CLI/Python versions you're using.

@tim-finnigan tim-finnigan added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Nov 3, 2022
@github-actions
Copy link

github-actions bot commented Nov 8, 2022

Greetings! It looks like this issue hasn’t been active in longer than five days. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-for-staleness feature-request A feature should be added or improved. installation p3 This is a minor priority issue response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. v2
Projects
None yet
Development

No branches or pull requests

6 participants