Getting below error while installing pywinpty
Collecting https://files.pythonhosted.org/packages/b0/2c/11676105f51a7718316cd74186630f4a4cb0efa3530ebf3cfbe0b72e35cb/pywinpty-1.0.1.tar.gz Using cached https://files.pythonhosted.org/packages/b0/2c/11676105f51a7718316cd74186630f4a4cb0efa3530ebf3cfbe0b72e35cb/pywinpty-1.0.1.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in IOError: [Errno 2] No such file or directory: '/tmp/pip-ScCf1b-build/setup.py'
---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-ScCf1b-build/
Now i am getting below error while installing using the command pip install pywinpty==0.5.7
Collecting pywinpty==0.5.7
Using cached https://files.pythonhosted.org/packages/5d/97/8e43c2152a638cdb83d45644eb125c752abe67249f94bb3e3e29b0709685/pywinpty-0.5.7.tar.gz
Requirement already satisfied: backports.shutil_which; python_version < "3.0" in /opt/virtualenvs/certerminal/lib/python2.7/site-packages (from pywinpty==0.5.7)
Building wheels for collected packages: pywinpty
Running setup.py bdist_wheel for pywinpty ... error
Complete output from command /opt/virtualenvs/certerminal/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-CI2oGR/pywinpty/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpYI7Uslpip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/winpty
copying winpty/__init__.py -> build/lib.linux-x86_64-2.7/winpty
copying winpty/ptyprocess.py -> build/lib.linux-x86_64-2.7/winpty
copying winpty/winpty_wrapper.py -> build/lib.linux-x86_64-2.7/winpty
creating build/lib.linux-x86_64-2.7/winpty/_winpty
copying winpty/_winpty/__init__.py -> build/lib.linux-x86_64-2.7/winpty/_winpty
creating build/lib.linux-x86_64-2.7/winpty/tests
copying winpty/tests/__init__.py -> build/lib.linux-x86_64-2.7/winpty/tests
copying winpty/tests/test_cywinpty.py -> build/lib.linux-x86_64-2.7/winpty/tests
copying winpty/tests/test_ptyprocess.py -> build/lib.linux-x86_64-2.7/winpty/tests
copying winpty/tests/test_winpty_wrapper.py -> build/lib.linux-x86_64-2.7/winpty/tests
running build_ext
building 'winpty.cywinpty' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/winpty
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c winpty/cywinpty.c -o build/temp.linux-x86_64-2.7/winpty/cywinpty.o
winpty/cywinpty.c:628:21: fatal error: Windows.h: No such file or directory
#include "Windows.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Failed building wheel for pywinpty
Running setup.py clean for pywinpty
Failed to build pywinpty
Installing collected packages: pywinpty
Running setup.py install for pywinpty ... error
Complete output from command /opt/virtualenvs/certerminal/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-CI2oGR/pywinpty/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-n18o4q-record/install-record.txt --single-version-externally-managed --compile --install-headers /opt/virtualenvs/certerminal/include/site/python2.7/pywinpty:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/winpty
copying winpty/__init__.py -> build/lib.linux-x86_64-2.7/winpty
copying winpty/ptyprocess.py -> build/lib.linux-x86_64-2.7/winpty
copying winpty/winpty_wrapper.py -> build/lib.linux-x86_64-2.7/winpty
creating build/lib.linux-x86_64-2.7/winpty/_winpty
copying winpty/_winpty/__init__.py -> build/lib.linux-x86_64-2.7/winpty/_winpty
creating build/lib.linux-x86_64-2.7/winpty/tests
copying winpty/tests/__init__.py -> build/lib.linux-x86_64-2.7/winpty/tests
copying winpty/tests/test_cywinpty.py -> build/lib.linux-x86_64-2.7/winpty/tests
copying winpty/tests/test_ptyprocess.py -> build/lib.linux-x86_64-2.7/winpty/tests
copying winpty/tests/test_winpty_wrapper.py -> build/lib.linux-x86_64-2.7/winpty/tests
running build_ext
building 'winpty.cywinpty' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/winpty
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c winpty/cywinpty.c -o build/temp.linux-x86_64-2.7/winpty/cywinpty.o
winpty/cywinpty.c:628:21: fatal error: Windows.h: No such file or directory
#include "Windows.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/opt/virtualenvs/certerminal/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-CI2oGR/pywinpty/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-n18o4q-record/install-record.txt --single-version-externally-managed --compile --install-headers /opt/virtualenvs/certerminal/include/site/python2.7/pywinpty" failed with error code 1 in /tmp/pip-build-CI2oGR/pywinpty/