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 'awsmfa' #57

Open
michal-kubicki opened this issue Jul 8, 2020 · 7 comments
Open

ModuleNotFoundError: No module named 'awsmfa' #57

michal-kubicki opened this issue Jul 8, 2020 · 7 comments

Comments

@michal-kubicki
Copy link

After upgrading Python from 2.7.x to 3.8.x (on macOS) I get the following error:

Traceback (most recent call last):
  File "/usr/local/bin/aws-mfa", line 6, in <module>
    from awsmfa import main
ModuleNotFoundError: No module named 'awsmfa'

I did uninstall aws-mfa, relinked Python, installed aws-mfa again but it didn't help.

@fkarakas
Copy link

brew switch python 3.7.7
brew unlink python@3.8

@toddmetheny
Copy link

I'm also having this issue

@fkarakas
Copy link

fkarakas commented Sep 9, 2020

i got this issue after a brew upgrade, i had to resintall pip3 with a curl

curl -sS https://bootstrap.pypa.io/get-pip.py | sudo python3
pip3 uninstall aws-mfa
pip3 install aws-mfa

@toddmetheny
Copy link

@fkarakas I tried that but I'm still getting the same error. I'd take welcome any other ideas if you have any.

@fkarakas
Copy link

fkarakas commented Sep 9, 2020

i don't know, another try...

brew remove python3
brew install python3
curl -sS https://bootstrap.pypa.io/get-pip.py | sudo python3
pip3 uninstall aws-mfa
pip3 install aws-mfa

@bzswords
Copy link

I ran into the same issue. It turned out my pip3 installation was messed up. To get to the point aws-mfa worked for me again I ran:

python3 -m ensurepip --default-pip
pip3 uninstall aws-mfa
pip3 install aws-mfa

macOS 11.1, python 3.9.1

@kennethlynne
Copy link

kennethlynne commented Sep 4, 2023

It was broken for me with both python 3.11 and 3.10. Using conda and python 3.9 it finally works again.

conda activate <your python 3.9 env>
python -m ensurepip --default-pip
pip install aws-mfa

success

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

No branches or pull requests

5 participants