在Windows 10和#x27上的CLI中安装带pip的ansible时出错:;OSError:[Errno 2]没有这样的文件或目录';

在Windows 10和#x27上的CLI中安装带pip的ansible时出错:;OSError:[Errno 2]没有这样的文件或目录';,pip,ansible,windows-10,oserror,Pip,Ansible,Windows 10,Oserror,无论我是使用pip还是pip3,还是在PowerShell或bash中,或者使用或不使用--user,我得到的整个输出消息都是: PS C:\Users\user> pip install ansible --user Collecting ansible Using cached ansible-4.0.0.tar.gz (33.3 MB) ERROR: Could not install packages due to an OSError: [Errno 2] No such f

无论我是使用
pip
还是
pip3
,还是在
PowerShell
bash
中,或者使用或不使用
--user
,我得到的整个输出消息都是:

PS C:\Users\user> pip install ansible --user
Collecting ansible
  Using cached ansible-4.0.0.tar.gz (33.3 MB)
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-i5a881am\\ansible_79b10d1774894f28be88e26c8c0385cb\\ansible_collections/amazon/aws/tests/unit/plugins/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.CreateStack_1.json'

多亏@Zeitounator对我的OP的评论,我终于可以在
Windows10 WSL
上正确安装
ansible


这里需要强调的是,要实现这一点,需要安装
bash CLI
(或者更确切地说)。

从:
控制节点不支持Windows,请在[Matt Davis的博客文章]中阅读更多有关此方面的信息(http://blog.rolpdog.com/2020/03/why-no-ansible-controller-for-windows.html)
。不过你可以。非常感谢,它成功了。