【问题标题】:OSError when installing ansible with pip in CLI on Windows 10: 'OSError: [Errno 2] No such file or directory'在 Windows 10 的 CLI 中使用 pip 安装 ansible 时出现 OSError:'OSError: [Errno 2] No such file or directory'
【发布时间】:2023-03-28 03:13:01
【问题描述】:

无论我使用pippip3,或PowerShellbash,或使用或不使用--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'

【问题讨论】:

  • 来自doc on controller node requirementsWindows is not supported for the control node, read more about this in [Matt Davis’s blog post](http://blog.rolpdog.com/2020/03/why-no-ansible-controller-for-windows.html)。不过你可以install ansible in WSL
  • 非常感谢,它成功了。

标签: pip ansible windows-10 oserror


【解决方案1】:

感谢@Zeitounator 对我的OP 的评论,我终于可以使用this linkWindows10 WSL 上正确安装ansible

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

【讨论】:

    猜你喜欢
    • 2016-06-07
    • 2017-07-05
    • 2018-11-20
    • 2018-07-24
    • 1970-01-01
    • 2019-03-25
    • 1970-01-01
    • 1970-01-01
    • 2018-01-21
    相关资源
    最近更新 更多