Getting “/usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directo” when running S3 command on Mac

旧街凉风 提交于 2020-01-24 23:06:19

问题


I'm using Mac High Sierra. I'm tryhign to install Amazon's S3 cli tools. I thought I had installed successfully through pip, but then I got this error tryihng to run an s3 command ...

localhost:~ davea$ s3cmd --recursive ls s3://sbdasset.springboardonline.com | grep "resource"
-bash: /usr/local/bin/s3cmd: /usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directory

Per the answer here -- pip installation /usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directory, I tried the recommendation ...

localhost:~ davea$ brew link --overwrite python
Warning: Already linked: /usr/local/Cellar/python/3.7.2_2
To relink: brew unlink python && brew link python

However, then I re-ran the above command and got the same error. None of the other answers in that SO post worked. What else do I need ot check install to get Amazon's S3 cli tools working?


回答1:


try to open a new terminal and run s3cmd, it maybe env variables missing if not working do one of the following: try to reinstall python

brew install python@2

or install Anaconda https://www.anaconda.com/distribution/#macos then open a new terminal window and try again it should work



来源:https://stackoverflow.com/questions/54890670/getting-usr-local-opt-python-bin-python2-7-bad-interpreter-no-such-file-or-d

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!