【问题标题】:Install ansible on windows getting too long在窗口太长时安装 ansible
【发布时间】:2019-08-06 18:40:28
【问题描述】:

我正在使用 cygwin64 终端在 Windows 10 上安装 Ansible。一切正常,直到安装 pynacl 卡住。我错过了什么?

Collecting ansible
  Using cached https://files.pythonhosted.org/packages/c0/01/2c7e45c7eea540c4e4238cd404ccc950c0ef61ebf8d29d04b191caba4fb8/ansible-2.7.9.tar.gz
Collecting jinja2 (from ansible)
  Using cached https://files.pythonhosted.org/packages/7f/ff/ae64bacdfc95f27a016a7bed8e8686763ba4d277a78ca76f32659220a731/Jinja2-2.10-py2.py3-none-any.whl
Collecting PyYAML (from ansible)
  Using cached https://files.pythonhosted.org/packages/9f/2c/9417b5c774792634834e730932745bc09a7d36754ca00acf1ccd1ac2594d/PyYAML-5.1.tar.gz
Collecting paramiko (from ansible)
  Using cached https://files.pythonhosted.org/packages/cf/ae/94e70d49044ccc234bfdba20114fa947d7ba6eb68a2e452d89b920e62227/paramiko-2.4.2-py2.py3-none-any.whl
Requirement already satisfied: cryptography in /usr/lib/python2.7/site-packages (from ansible) (1.8.1)
Requirement already satisfied: setuptools in /usr/lib/python2.7/site-packages (from ansible) (40.7.3)
Collecting MarkupSafe>=0.23 (from jinja2->ansible)
  Using cached https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz
Collecting bcrypt>=3.1.3 (from paramiko->ansible)
Collecting pyasn1>=0.1.7 (from paramiko->ansible)
  Using cached https://files.pythonhosted.org/packages/7b/7c/c9386b82a25115cccf1903441bba3cbadcfae7b678a20167347fa8ded34c/pyasn1-0.4.5-py2.py3-none-any.whl
Collecting pynacl>=1.0.1 (from paramiko->ansible)
  Using cached https://files.pythonhosted.org/packages/61/ab/2ac6dea8489fa713e2b4c6c5b549cc962dd4a842b5998d9e80cf8440b7cd/PyNaCl-1.3.0.tar.gz
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: enum34 in /usr/lib/python2.7/site-packages (from cryptography->ansible) (1.1.6)
Requirement already satisfied: idna>=2.1 in /usr/lib/python2.7/site-packages (from cryptography->ansible) (2.5)
Requirement already satisfied: cffi>=1.4.1 in /usr/lib/python2.7/site-packages (from cryptography->ansible) (1.9.1)
Requirement already satisfied: six>=1.4.1 in /usr/lib/python2.7/site-packages (from cryptography->ansible) (1.10.0)
Requirement already satisfied: ipaddress in /usr/lib/python2.7/site-packages (from cryptography->ansible) (1.0.18)
Requirement already satisfied: asn1crypto>=0.21.0 in /usr/lib/python2.7/site-packages (from cryptography->ansible) (0.22.0)
Requirement already satisfied: packaging in /usr/lib/python2.7/site-packages (from cryptography->ansible) (16.8)
Requirement already satisfied: pycparser in /usr/lib/python2.7/site-packages (from cffi>=1.4.1->cryptography->ansible) (2.17)
Requirement already satisfied: pyparsing in /usr/lib/python2.7/site-packages (from packaging->cryptography->ansible) (2.1.10)
Building wheels for collected packages: pynacl
  Building wheel for pynacl (PEP 517) ... 

【问题讨论】:

    标签: python-2.7 ansible cygwin python-wheel


    【解决方案1】:

    如果您的 win10 版本 >= 1709,您可以使用 WSL - 适用于 Linux 的 Windows 子系统。它在 Windows 中有一个特殊的 Linux 内核。在 WSL 中,安装 Ansible 非常容易。我更喜欢使用pip install ansible 的方式。 pip 是 python 包管理器,所以在启动 WSL 之后,你可以运行:

    sudo apt update && upgrade
    sudo apt install python3 python3-pip
    sudo pip3 install ansible
    

    那么你的 Windows 10 上运行了最新的 ansible。

    祝你好运!

    奥利弗

    【讨论】:

    • 感谢您的回答,我会尝试您的解决方案,但仍需要此问题的答案。
    • 你试过github.com/pyca/pynacl/issues/404#issuecomment-429267083。 themiwi 在 2018 年 10 月 12 日说:由于 Cygwin 已经包含一个钠包,所以诀窍是使用导出的 SODIUM_INSTALL=system 环境变量进行安装。
    • @OliverGaida 的提示是我的解决方案!
    猜你喜欢
    • 1970-01-01
    • 2017-02-03
    • 1970-01-01
    • 1970-01-01
    • 2015-02-13
    • 2022-06-30
    • 2017-08-28
    • 2022-01-09
    • 1970-01-01
    相关资源
    最近更新 更多