0

I am trying to get ansible installed in venv in Python 3.8 in Windows 10.

I have tried:

pip install -U setuptools
pip3 install ansible
pip install –user

So far that has not worked.

I am getting error:

ERROR: Command errored out with exit status 1: 'c:\users\XXXXXXX\python\test_env\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\XXXXXXX\\AppData\\Local\\Temp\\pip-install-fi3oz0fp\\ansible\\setup.py'"'"';
 __file__='"'"'C:\\Users\\XXXXXXX\\AppData\\Local\\Temp\\pip-install-fi3oz0fp\\ansible\\setup.py'"'"';
 f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');
 f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\XXXXXXX\AppData\Local\Temp\pip-record-y3d0j5k5\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\XXXXXXX\python\test_env\include\site\python3.8\ansible' Check the logs for full command output.
martineau
  • 99,260
  • 22
  • 139
  • 249

1 Answers1

1

From the documentation regarding requirements for the control node:

Currently Ansible can be run from any machine with Python 2 (version 2.7) or Python 3 (versions 3.5 and higher) installed. This includes Red Hat, Debian, CentOS, macOS, any of the BSDs, and so on. Windows is not supported for the control node.

Meanwhile you can run ansible on Windows 10 from WSL (prefered) or from cygwin.

Zeitounator
  • 18,663
  • 4
  • 26
  • 38
  • I tried Ubuntu in WSL but our proxy blocks any repo so I cannot install or update any packages. – jjevans Apr 01 '20 at 21:48
  • ubuntu should already have python/pip installed and pip uses the exact same index url as the one you used in windows. But of course, if you need any apt package, this is going to be hard. – Zeitounator Apr 01 '20 at 22:13