wbingli / awscli-plugin-endpoint

An awscli plugin to configure service endpoint from aws configure file
Apache License 2.0
207 stars 23 forks source link

No module named awscli_plugin_endpoint #12

Closed forrie closed 5 years ago

forrie commented 5 years ago

I've followed these directions to a t and I continue to get this error:

No module named awscli_plugin_endpoint

I'm running MacOS Mojave (up to date) and using the stock /usr/bin/python for aws (up to date). No luck, no matter what I do. Even if I manually add this info, it fails.

I do have MacPorts present, but I've made sure python is using /usr/bin/python.

Constm commented 5 years ago

Same here. MBP-2015:.aws const$ aws --version aws-cli/1.16.144 Python/2.7.10 Darwin/18.5.0 botocore/1.12.134

wbtdc commented 5 years ago

Same here. I'm using the master branch. I also did the pip install with the --user flag since I'm on shared hosting. Might that be the reason? I see the plugin is installed here:

./.local/lib/python2.6/site-packages/awscli_plugin_endpoint

Any advice?

wbtdc commented 5 years ago

OK, I figured it out. Instead of doing pip install awscli-plugin-endpoint (which was using /usr/local/pip) I needed to do aws/bin/pip install awscli-plugin-endpoint. That used the locally installed pip. I'm guessing that the others on this thread can find this solution useful as well.

wbingli commented 5 years ago

Thanks @wbtdc

BTW, how do you install awscli?

wbtdc commented 5 years ago

I did virtualenv -p python2.7 py27That installs a virtual environment in the py27 subfolder of the current directory. Then I did source py27/bin/activate That switched me to the new py virtual env. Then I didpip install --index-url=https://pypi.python.org/simple/ awscliThat did it. I'm going from memory since I'm on my phone now, but I think that was it. I'm still getting SSL warnings that are caused by too old a version of python (this got me 2.7.8). Apparently I need 2.7.9 to get rid of the warnings and I haven't figured that part out yet. If anyone else can help, I'd appreciate any advice on that part. You can also do python3 but that only gets you to 3.2.3 and apparently your need 3.3 or greater. For some reason it's really hard to make the jump to those newer versions for some reason. I'm not a python guy, so this is all from googling.Good luck! DaveOn May 10, 2019 11:15 AM, Wenbing Li notifications@github.com wrote:Thanks @wbtdc BTW, how do you install awscli?

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.

blackstrype commented 4 years ago

Has anyone dealt with this issue on windows Python3 ? I just upgraded from 3.6 to 3.8 and my endpoint plugin isn't working anymore, but I haven't really understood the fix mentioned by @wbtdc .

I use aws-shell ontop of awscli:

aws> configure
Traceback (most recent call last):
  File "C:\Program Files\Amazon\AWSCLI\bin\aws-script.py", line 7, in <module>
    sys.exit(main())
  File "C:\Program Files\Amazon\AWSCLI\runtime\lib\site-packages\awscli\clidriver.py", line 58, in main
    driver = create_clidriver()
  File "C:\Program Files\Amazon\AWSCLI\runtime\lib\site-packages\awscli\clidriver.py", line 68, in create_clidriver
    event_hooks=session.get_component('event_emitter'))
  File "C:\Program Files\Amazon\AWSCLI\runtime\lib\site-packages\awscli\plugin.py", line 44, in load_plugins
    modules = _import_plugins(plugin_mapping)
  File "C:\Program Files\Amazon\AWSCLI\runtime\lib\site-packages\awscli\plugin.py", line 58, in _import_plugins
    plugins.append(__import__(path))
ModuleNotFoundError: No module named 'awscli_plugin_endpoint'

Maybe I can just copy in the plugin to the sitepackages ? Any thoughts ?