请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

pkg_resources.ResolutionError: Script 'scripts/ansible' not found

安装ansible成功,有finish信息,ansible模块也可以导入,但是运行/opt/python2.7/bin/ansible --version 命令就报下面的错误


pkg_resources.ResolutionError: Script 'scripts/ansible' not found in metadata at '/opt/python2.7/lib/python2.7/site-packages/ansible-2.4.1.0-py2.7.egg-info'

//img1.sycdn.imooc.com//szimg/5a83f1570001f17007360396.jpg

//img1.sycdn.imooc.com//szimg/5a83f28200015c1007690305.jpg

正在回答 回答被采纳积分+3

1回答

提问者 二月十三 2018-02-14 17:36:08

根据github上的winsible: egg option to pip https://github.com/pjeby/winsible/issues?q=is%3Aissue+is%3Aclosed

Alternately, try the --egg option to pip, to request that ansible be installed as an egg. My guess is that the problem is that pip doesn't install the .egg-info/scripts directory when not installing as an egg. (IMO that would be a compatibility bug in pip and should probably be reported, if that's the case.)


$ pip uninstall ansible
$ pip install --egg ansible

ansible --version 正常运行了


0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信