Before installing ansible using "pip install -U ansible" , we need to install following packages
ubuntu : python-dev , libssl-dev , gcc
Centos : python-devel, openssl-devel, gcc
For ubuntu: if python-dev not installed then Error will be :
writing requirements to src/cryptography.egg-info/requires.txt
writing src/cryptography.egg-info/PKG-INFO
writing top-level names to src/cryptography.egg-info/top_level.txt
writing dependency_links to src/cryptography.egg-info/dependency_links.txt
writing entry points to src/cryptography.egg-info/entry_points.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'src/cryptography.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/_build'
warning: no previously-included files matching '*' found under directory 'vectors'
writing manifest file 'src/cryptography.egg-info/SOURCES.txt'
running build_ext
generating cffi module 'build/temp.linux-x86_64-2.7/_padding.c'
creating build/temp.linux-x86_64-2.7
generating cffi module 'build/temp.linux-x86_64-2.7/_constant_time.c'
generating cffi module 'build/temp.linux-x86_64-2.7/_openssl.c'
building '_openssl' extension
creating build/temp.linux-x86_64-2.7/build
creating build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c build/temp.linux-x86_64-2.7/_openssl.c -o build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/_openssl.o
build/temp.linux-x86_64-2.7/_openssl.c:12:24: fatal error: pyconfig.h: No such file or directory
# include <pyconfig.h> ^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-HDDNRD/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-RmBIw5-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-HDDNRD/cryptography/
/usr/local/lib/python2.7/dist-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.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
after installing python-dev below error will occur :
generating cffi module 'build/temp.linux-x86_64-2.7/_constant_time.c'
generating cffi module 'build/temp.linux-x86_64-2.7/_openssl.c'
building '_openssl' extension
creating build/temp.linux-x86_64-2.7/build
creating build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c build/temp.linux-x86_64-2.7/_openssl.c -o build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/_openssl.o
build/temp.linux-x86_64-2.7/_openssl.c:433:30: fatal error: openssl/opensslv.h: No such file or directory
#include <openssl/opensslv.h> ^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ZN2RG3/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-akw7P8-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-ZN2RG3/cryptography/
/usr/local/lib/python2.7/dist-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.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Before installing ansible using "pip install -U ansible" , we need to install following packages
ubuntu : python-dev , libssl-dev , gcc
Centos : python-devel, openssl-devel, gcc
For ubuntu: if python-dev not installed then Error will be :
writing requirements to src/cryptograph y.egg-info/ requires. txt y.egg-info/ PKG-INFO y.egg-info/ top_level. txt y.egg-info/ dependency_ links.txt y.egg-info/ entry_points. txt
writing src/cryptograph
writing top-level names to src/cryptograph
writing dependency_links to src/cryptograph
writing entry points to src/cryptograph
warning: manifest_maker: standard file '-c' not found
reading manifest file 'src/cryptograp hy.egg- info/SOURCES. txt' hy.egg- info/SOURCES. txt' temp.linux- x86_64- 2.7/_padding. c' linux-x86_ 64-2.7 temp.linux- x86_64- 2.7/_constant_ time.c' temp.linux- x86_64- 2.7/_openssl. c' linux-x86_ 64-2.7/ build linux-x86_ 64-2.7/ build/temp. linux-x86_ 64-2.7 64-linux- gnu-gcc -pthread -fno-strict- aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/ include/ python2. 7 -c build/temp. linux-x86_ 64-2.7/ _openssl. c -o build/temp. linux-x86_ 64-2.7/ build/temp. linux-x86_ 64-2.7/ _openssl. o temp.linux- x86_64- 2.7/_openssl. c:12:24: fatal error: pyconfig.h: No such file or directory
^ linux-gnu- gcc' failed with exit status 1
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/_build'
warning: no previously-included files matching '*' found under directory 'vectors'
writing manifest file 'src/cryptograp
running build_ext
generating cffi module 'build/
creating build/temp.
generating cffi module 'build/
generating cffi module 'build/
building '_openssl' extension
creating build/temp.
creating build/temp.
x86_
build/
# include <pyconfig.h>
compilation terminated.
error: command 'x86_64-
--- ------- ------- ------- ------- ------- -- __file_ _='/tmp/ pip-build- HDDNRD/ cryptography/ setup.py' ;exec(compile( getattr( tokenize, 'open', open)(_ _file__ ).read( ).replace( '\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip- RmBIw5- record/ install- record. txt --single- version- externally- managed --compile" failed with error code 1 in /tmp/pip- build-HDDNRD/ cryptography/ lib/python2. 7/dist- packages/ pip/_vendor/ requests/ packages/ urllib3/ util/ssl_ .py:122: InsecurePlatfor mWarning: 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. org/en/ latest/ security. html#insecurepl atformwarning. ormWarning
Command "/usr/bin/python -u -c "import setuptools, tokenize;
/usr/local/
InsecurePlatf
after installing python-dev below error will occur :
generating cffi module 'build/ temp.linux- x86_64- 2.7/_constant_ time.c' temp.linux- x86_64- 2.7/_openssl. c' linux-x86_ 64-2.7/ build linux-x86_ 64-2.7/ build/temp. linux-x86_ 64-2.7 64-linux- gnu-gcc -pthread -fno-strict- aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/ include/ python2. 7 -c build/temp. linux-x86_ 64-2.7/ _openssl. c -o build/temp. linux-x86_ 64-2.7/ build/temp. linux-x86_ 64-2.7/ _openssl. o temp.linux- x86_64- 2.7/_openssl. c:433:30: fatal error: openssl/opensslv.h: No such file or directory opensslv. h>
^ linux-gnu- gcc' failed with exit status 1
generating cffi module 'build/
building '_openssl' extension
creating build/temp.
creating build/temp.
x86_
build/
#include <openssl/
compilation terminated.
error: command 'x86_64-
--- ------- ------- ------- ------- ------- -- __file_ _='/tmp/ pip-build- ZN2RG3/ cryptography/ setup.py' ;exec(compile( getattr( tokenize, 'open', open)(_ _file__ ).read( ).replace( '\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip- akw7P8- record/ install- record. txt --single- version- externally- managed --compile" failed with error code 1 in /tmp/pip- build-ZN2RG3/ cryptography/ lib/python2. 7/dist- packages/ pip/_vendor/ requests/ packages/ urllib3/ util/ssl_ .py:122: InsecurePlatfor mWarning: 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. org/en/ latest/ security. html#insecurepl atformwarning. ormWarning
Command "/usr/bin/python -u -c "import setuptools, tokenize;
/usr/local/
InsecurePlatf
For above error i installed libssl-dev.
then problem solved