[英]Already installed Ansible on OSX via PIP but still not found
I already installed ansible
via pip
but when I run ansible
via the command line it says command still not found. 我已经通过pip
安装了ansible
,但是当我通过命令行运行ansible
,仍然说找不到命令。
I also looked for the /etc/ansible/hosts
file but it seems that it's not found. 我还寻找了/etc/ansible/hosts
文件,但似乎没有找到。
Am I missing something? 我想念什么吗?
Commands I ran: sudo pip install ansible
我运行的命令: sudo pip install ansible
and response was 回应是
Successfully installed ansible paramiko jinja2 PyYAML pycrypto ecdsa MarkupSafe
I also have Xcode
installed. 我也安装了Xcode
。
I can also see that ansible
is indeed installed in pip list
: 我还可以看到ansible
确实安装在pip list
:
ansible (2.0.2.0) ansible(2.0.2.0)
ecdsa (0.13) ecdsa(0.13)
Jinja2 (2.8) 金甲2(2.8)
MarkupSafe (0.23) 标记安全(0.23)
mysql-utilities (1.5.3) mysql-utilities(1.5.3)
paramiko (1.16.0) paramiko(1.16.0)
pip (1.5.6) 点(1.5.6)
pycrypto (2.6.1) pycrypto(2.6.1)
PyYAML (3.11) PyYAML(3.11)
setuptools (20.9.0) setuptools(20.9.0)
vboxapi (1.0) vboxapi(1.0)
wsgiref (0.1.2) wsgiref(0.1.2)
So fixed my own problem. 所以解决了我自己的问题。 I had Python
installed before and had another instance installed when I installed Xcode
. 我之前安装过Python
,而在安装Xcode
时又安装了另一个实例。 So what I did is removed my previous installation and just used the Python
that came with Xcode
. 因此,我所做的是删除了先前的安装,只使用了Xcode
随附的Python
。 It was confusing at first because they both have the same version so I wasn't sure which was which. 起初令人困惑,因为它们具有相同的版本,所以我不确定哪个是哪个。
So I have an existing /usr/bin/python
installed but I'm not sure where this is sourced from. 所以我已经安装了现有的/usr/bin/python
但是我不确定这是从哪里来的。 Because this doesn't seem like a symbolic link but actually an executable. 因为这似乎不是符号链接,但实际上是可执行文件。 Anyone has an idea? 有人有主意吗? Is this from the /System/
or from /Library/
? 是来自/System/
还是/Library/
?
So fixed my own problem. 所以解决了我自己的问题。 I had Python
installed before and had another instance installed when I installed Xcode
. 我之前安装过Python
,而在安装Xcode
时又安装了另一个实例。 So what I did is removed my previous installation and just used the Python
that came with Xcode
. 因此,我所做的是删除了先前的安装,只使用了Xcode
随附的Python
。 It was confusing at first because they both have the same version so I wasn't sure which was which. 起初令人困惑,因为它们具有相同的版本,所以我不确定哪个是哪个。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.