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

ModuleNotFoundError: No module named 'botocore' | Windows | AWS CLI #6394

Closed
3 of 5 tasks
akshaykhc opened this issue Sep 10, 2021 · 11 comments
Closed
3 of 5 tasks

ModuleNotFoundError: No module named 'botocore' | Windows | AWS CLI #6394

akshaykhc opened this issue Sep 10, 2021 · 11 comments
Assignees
Labels
closed-for-staleness guidance Question that needs advice or information. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@akshaykhc
Copy link

Confirm by changing [ ] to [x] below:

Issue is about usage on:

  • Service API : I want to do X using Y service, what should I do?
  • CLI : passing arguments or cli configurations.
  • Other/Not sure.

Platform/OS/Hardware/Device
What are you running the cli on? Windows

Describe the question

When attempting to execute the "aws --version" command, I am getting the following error: ModuleNotFoundError: No module named 'botocore'

C:\Users\Administrator>aws --version
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\Scripts\aws.cmd", line 50, in
import awscli.clidriver
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\awscli-1.16.14-py3.9.egg\awscli
clidriver.py", line 17, in
import botocore.session
ModuleNotFoundError: No module named 'botocore'

Please help!

@akshaykhc akshaykhc added guidance Question that needs advice or information. needs-triage This issue or PR still needs to be triaged. labels Sep 10, 2021
@akshaykhc akshaykhc reopened this Sep 10, 2021
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

@tim-finnigan tim-finnigan self-assigned this Sep 10, 2021
@tim-finnigan tim-finnigan added investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Sep 10, 2021
@tim-finnigan
Copy link
Contributor

Hi @akshaykhc, thanks for reaching out. Have you tried following these AWS CLI installation instructions for Windows? https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-windows.html

Please try following the steps there and let us know if you run into any issues.

@tim-finnigan tim-finnigan added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Sep 10, 2021
@akshaykhc
Copy link
Author

Hello Tim, thank you for looking into this issue. I tried following the above-provided documentation. However, now I am getting the following error:

aws --version resulted in
C:\MGTI\AWS-Snowcone\aws-cli-1.16.14>aws --version Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\Scripts\aws.cmd", line 50, in
import awscli.clidriver
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\awscli-1.16.14-py3.9.egg\awscli\clidriver.py", line 36, in
from awscli.help import ProviderHelpCommand
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\awscli-1.16.14-py3.9.egg\awscli\help.py", line 23, in
from botocore.docs.bcdoc import docevents
ImportError: cannot import name 'docevents' from 'botocore.docs.bcdoc' (C:\Users\Administrator\AppData\Roaming\Python\Python39\site-packages\botocore\docs\bcdoc_init_.py)

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Sep 14, 2021
@akshaykhc
Copy link
Author

Just an FYI, I was told to use aws cli 1.16.14 for snowball: https://docs.aws.amazon.com/snowball/latest/developer-guide/using-adapter.html#cli-version

@tim-finnigan
Copy link
Contributor

Hi @akshaykhc, thanks for following up. It looks like you have an incompatible version of botocore. You should uninstall botocore and the AWS CLI, and reinstall v1.16.14 using the MSI installer following the steps here: https://docs.aws.amazon.com/cli/latest/userguide/install-windows.html#msi-on-windows

For more context on botocore comptability, please refer to this comment: boto/boto3#2596 (comment)

All versions of the CLI released prior to 1.18.141 explicitly require a version of botocore < 1.18.0.

We will work to improve the install guide to account for exceptions such as these. Thanks for bringing this to our attention! Please let us know if you run into any other issues.

@tim-finnigan tim-finnigan added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Sep 14, 2021
@akshaykhc
Copy link
Author

Hello Tim, thank you!

Incompatible version? Ok. Could you confirm the command to check the current botocore version and the command to uninstall it?

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Sep 15, 2021
@tim-finnigan
Copy link
Contributor

Hi @akshaykhc, I would suggest trying pip3 show botocore to see the version and pip3 uninstall botocore to uninstall. Instructions on uninstalling aws-cli are included in the documentation mentioned earlier. Please let me know if that works for you.

@tim-finnigan tim-finnigan added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Sep 15, 2021
@akshaykhc
Copy link
Author

Thank you Tim. I will go through it and let you know the results.

@akshaykhc
Copy link
Author

So the msi installer has aws cli 1.20.42 and snowball needs 1.16.14

@tim-finnigan
Copy link
Contributor

Hi @akshaykhc, to install that specific version using the MSI please try this URL: https://s3.amazonaws.com/aws-cli/AWSCLI64-1.16.14.msi as recommended in this comment #1921 (comment). Apologies for not clarifying that earlier.

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Sep 15, 2021
@tim-finnigan tim-finnigan added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Sep 15, 2021
@github-actions
Copy link

Greetings! It looks like this issue hasn’t been active in longer than a week. We encourage you to check if this is still an issue in the latest release. Because it has been longer than a week since the last update on this, and 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 add an upvote to prevent automatic closure, or 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 Sep 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-for-staleness guidance Question that needs advice or information. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

2 participants