我正在遵循官方文档,以便在Ubuntu上安装aws-cli。
但是,pip安装成功,但是当我运行命令时:
sudo pip install awscli --upgrade --user
我收到以下错误:
Traceback (most recent call last):
File "/home/aviral/.local/bin/aws", line 27, in <module>
sys.exit(main())
File "/home/aviral/.local/bin/aws", line 23, in main
return awscli.clidriver.main()
File "/usr/local/lib/python3.5/dist-packages/awscli/clidriver.py", line 58, in main
driver = create_clidriver()
File "/usr/local/lib/python3.5/dist-packages/awscli/clidriver.py", line 68, in create_clidriver
event_hooks=session.get_component('event_emitter'))
File "/usr/local/lib/python3.5/dist-packages/awscli/plugin.py", line 44, in load_plugins
modules = _import_plugins(plugin_mapping)
File "/usr/local/lib/python3.5/dist-packages/awscli/plugin.py", line 61, in _import_plugins
module = __import__(path, fromlist=[module])
File "/usr/local/lib/python3.5/dist-packages/awscli/handlers.py", line 20, in <module>
from awscli.paramfile import register_uri_param_handler
File "/usr/local/lib/python3.5/dist-packages/awscli/paramfile.py", line 18, in <module>
from botocore.httpsession import URLLib3Session
ImportError: No module named 'botocore.httpsession
我的Python是:
/usr/local/bin/python
我的双眼是:
/home/aviral/.local/bin/aws
答案 0 :(得分:2)
尝试运行此命令:
sudo pip install awscli --force-reinstall --upgrade --ignore-installed
在这里回答类似的问题:ImportError
编辑:
上一个命令:
pip install awscli --force-reinstall --upgrade