Python 2.7 在windows上安装ansible变得太长

Python 2.7 在windows上安装ansible变得太长,python-2.7,ansible,cygwin,python-wheel,Python 2.7,Ansible,Cygwin,Python Wheel,我正在使用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 an

我正在使用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) ... 

如果您的win10版本>=1709,则可以使用WSL-Windows子系统进行Linux操作。它在Windows中有一个特殊的Linuxkernel。在WSL中,安装Ansible非常容易。我更喜欢使用
pip安装ansible
的方式。pip是python包管理器,因此在启动WSL后,您可以运行:

sudo apt update && upgrade
sudo apt install python3 python3-pip
sudo pip3 install ansible
然后,您就可以在windows 10上运行最新的ansible

祝你好运


奥利弗

谢谢你的回答,我将尝试你的解决方案,但仍然需要这个问题的答案。你试过了吗。themiwi在2018年10月12日说:由于Cygwin已经包含了一个Na钠软件包,所以诀窍是使用导出的Na钠安装=系统环境变量进行安装。@OliverGaida的提示是我的解决方案!