# unable to install pywinrm on Centos 6.5

**URL:** <https://forum.ansible.com/t/unable-to-install-pywinrm-on-centos-6-5/26183>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [December 1, 2017, 10:14am UTC](https://forum.ansible.com/t/unable-to-install-pywinrm-on-centos-6-5/26183 "2017-12-01T10:14:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Afroz\_Hussain](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@Afroz\_Hussain](https://forum.ansible.com/u/Afroz_Hussain)\
**Post date:** [December 1, 2017, 10:14am UTC](https://forum.ansible.com/t/unable-to-install-pywinrm-on-centos-6-5/26183/1 "2017-12-01T10:14:07Z")

</div>

Hello everyone,

I am facing an issue while installing “pywinrm” for managing my windows host via Ansible, I am getting following errors:

Collecting pywinrm  
Using cached pywinrm-0.2.2-py2.py3-none-any.whl  
Requirement already satisfied: requests\>=2.9.1 in /usr/lib/python2.6/site-packages (from pywinrm)  
Requirement already satisfied: xmltodict in /usr/lib/python2.6/site-packages (from pywinrm)  
Requirement already satisfied: six in /usr/lib/python2.6/site-packages (from pywinrm)  
Collecting requests-ntlm\>=0.3.0 (from pywinrm)  
Using cached requests\_ntlm-1.1.0-py2.py3-none-any.whl  
Requirement already satisfied: chardet\<3.1.0,\>=3.0.2 in /usr/lib/python2.6/site-packages (from requests\>=2.9.1-\>pywinrm)  
Requirement already satisfied: certifi\>=2017.4.17 in /usr/lib/python2.6/site-packages (from requests\>=2.9.1-\>pywinrm)  
Requirement already satisfied: urllib3\<1.23,\>=1.21.1 in /usr/lib/python2.6/site-packages (from requests\>=2.9.1-\>pywinrm)  
Requirement already satisfied: idna\<2.7,\>=2.5 in /usr/lib/python2.6/site-packages (from requests\>=2.9.1-\>pywinrm)  
Collecting cryptography\>=1.3 (from requests-ntlm\>=0.3.0-\>pywinrm)  
Using cached cryptography-2.1.4.tar.gz  
Requirement already satisfied: ntlm-auth\>=1.0.2 in /usr/lib/python2.6/site-packages (from requests-ntlm\>=0.3.0-\>pywinrm)  
Requirement already satisfied: asn1crypto\>=0.21.0 in /usr/lib/python2.6/site-packages (from cryptography\>=1.3-\>requests-ntlm\>=0.3.0-\>pywinrm)  
Requirement already satisfied: enum34 in /usr/lib/python2.6/site-packages (from cryptography\>=1.3-\>requests-ntlm\>=0.3.0-\>pywinrm)  
Requirement already satisfied: ipaddress in /usr/lib/python2.6/site-packages (from cryptography\>=1.3-\>requests-ntlm\>=0.3.0-\>pywinrm)  
Collecting cffi\>=1.7 (from cryptography\>=1.3-\>requests-ntlm\>=0.3.0-\>pywinrm)  
/usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see [https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning](https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning).  
SNIMissingWarning  
/usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see [https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning](https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning).  
InsecurePlatformWarning  
Downloading cffi-1.11.2-cp26-cp26mu-manylinux1\_x86\_64.whl (405kB)  
100% |████████████████████████████████| 409kB 217kB/s  
Requirement already satisfied: ordereddict; python\_version \< “2.7” in /usr/lib64/python2.6/site-packages (from ntlm-auth\>=1.0.2-\>requests-ntlm\>=0.3.0-\>pywinrm)  
Requirement already satisfied: pycparser in /usr/lib/python2.6/site-packages (from cffi\>=1.7-\>cryptography\>=1.3-\>requests-ntlm\>=0.3.0-\>pywinrm)  
Installing collected packages: cffi, cryptography, requests-ntlm, pywinrm  
Running setup.py install for cryptography … error  
Complete output from command /usr/bin/python -u -c “import setuptools, tokenize; **file** =‘/tmp/pip-build-PX7Lla/cryptography/setup.py’;f=getattr(tokenize, ‘open’, open)( **file** );code=f.read().replace(‘\r\n’, ‘\n’);f.close();exec(compile(code, **file** , ‘exec’))” install --record /tmp/pip-daX7T4-record/install-record.txt --single-version-externally-managed --compile:  
Couldn’t find index page for ‘cffi’ (maybe misspelled?)  
No local packages or download links found for cffi\>=1.7  
Traceback (most recent call last):  
File “”, line 1, in   
File “/tmp/pip-build-PX7Lla/cryptography/setup.py”, line 307, in   
\*\*keywords\_with\_side\_effects(sys.argv)  
File “/usr/lib64/python2.6/distutils/core.py”, line 113, in setup  
\_setup\_distribution = dist = klass(attrs)  
File “/usr/lib/python2.6/site-packages/setuptools/dist.py”, line 221, in **init**  
self.fetch\_build\_eggs(attrs.pop(‘setup\_requires’))  
File “/usr/lib/python2.6/site-packages/setuptools/dist.py”, line 245, in fetch\_build\_eggs  
parse\_requirements(requires), installer=self.fetch\_build\_egg  
File “/usr/lib/python2.6/site-packages/pkg\_resources.py”, line 538, in resolve  
dist = best[req.key] = env.best\_match(req, self, installer)  
File “/usr/lib/python2.6/site-packages/pkg\_resources.py”, line 780, in best\_match  
return self.obtain(req, installer) # try and download/install  
File “/usr/lib/python2.6/site-packages/pkg\_resources.py”, line 792, in obtain  
return installer(requirement)  
File “/usr/lib/python2.6/site-packages/setuptools/dist.py”, line 293, in fetch\_build\_egg  
return cmd.easy\_install(req)  
File “/usr/lib/python2.6/site-packages/setuptools/command/easy\_install.py”, line 466, in easy\_install  
raise DistutilsError(msg)  
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse(‘cffi\>=1.7’)

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [December 2, 2017, 5:38pm UTC](https://forum.ansible.com/t/unable-to-install-pywinrm-on-centos-6-5/26183/2 "2017-12-02T17:38:03Z")

</div>

Looks like it wants a newer version of cffi.

What happens if you install cffi first?

I recall having some trouble getting cryptography installed when I was using Centos 6.5, but forget the details now. I think maybe I had to use yum to remove the version supplied with the OS. Things have probably moved on but my guess would be you have some conflict between the python libraries installed with the OS and the ones that are coming from pip. I would probably try uninstalling things from yum that were older versions and then having another go at the pip install (but not if the machine is doing something critical of course)

Hope this helps,

Jon

---

<div class="post-metadata">

**Author:** ![Selva\_Kumar](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/selva_kumar/32/5613_2.png) [@Selva\_Kumar](https://forum.ansible.com/u/Selva_Kumar)\
**Post date:** [December 4, 2017, 1:52am UTC](https://forum.ansible.com/t/unable-to-install-pywinrm-on-centos-6-5/26183/3 "2017-12-04T01:52:17Z")

</div>

I had the same issue with my RHEL6.4. The woraround I followed was to upgrade python on my system to 3.6. THen the installation of pywinrm went fine.

---

<div class="post-metadata">

**Author:** ![Afroz\_Hussain](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@Afroz\_Hussain](https://forum.ansible.com/u/Afroz_Hussain)\
**Post date:** [December 22, 2017, 12:34pm UTC](https://forum.ansible.com/t/unable-to-install-pywinrm-on-centos-6-5/26183/4 "2017-12-22T12:34:05Z")

</div>

Than you for your quick response and apologies for replying late.

Thank you Selva Kumar, It worked after following your steps. I have reinstalled Ansible using pip3.6
