Reputation: 907
I had installed Python and AWSCLI on Windows 10 and it was working fine a while ago. Now when I run aws ssm start-session
commands I get the following error:
ImportError: No module named awscli.clidriver
I know this is because Python cannot find the cli driver and is usually because it is not installed [properly]. In my case it was working fine and I think another installation that included Python broke it. I think it could have been Anaconda. I have done installed it again using pip3 install awscli --upgrade --user
and still get the same error. So my guess is that it is happening because I have two versions of python installed and somehow the right one is not found or part of my path. How can I investigate and resolve this issue?
Upvotes: 3
Views: 5845
Reputation: 437
Check which version of python your default is set too. You can change the preference default if you need to use a newer version of python. You can check your version via your cli:
python --version
To set a user preference you can use alias
alias python='/usr/bin/python3.4' # or whatever your path name is.
Once you have done that re-login or source your -bash.rc
file with
. ~/.bashrc
Then check your python version again to confirm it worked.
Upvotes: 2