pythondiscoverycl.exe

Python install 'asyncio' error: cl.exe failed with exit status 2


An error was encountered while installing asyncio. Asyncio is required for pydiscovery. Visual C++ for Python 2.7 has been installed but has not fixed the issue. Could it be because it's not compatible with Windows 10? If anyone knows the workaround on this issue, please help.

    pip install asyncio

....

    overlapped.c(68) : error C2065: 'PyExc_ConnectionRefusedError' : undeclared identifier
    overlapped.c(68) : warning C4047: '=' : 'PyObject *' differs in levels of indirection from 'int'
    overlapped.c(71) : error C2065: 'PyExc_ConnectionAbortedError' : undeclared identifier
    overlapped.c(71) : warning C4047: '=' : 'PyObject *' differs in levels of indirection from 'int'
    overlapped.c(714) : warning C4013: 'Py_MIN' undefined; assuming extern returning int
    overlapped.c(716) : warning C4013: 'Py_MAX' undefined; assuming extern returning int
    overlapped.c(1145) : warning C4013: 'PyUnicode_AsWideCharString' undefined; assuming extern returning int
    overlapped.c(1145) : warning C4047: '=' : 'wchar_t *' differs in levels of indirection from 'int'
    overlapped.c(1287) : error C2079: 'overlapped_module' uses undefined struct 'PyModuleDef'
    overlapped.c(1288) : error C2065: 'PyModuleDef_HEAD_INIT' : undeclared identifier
    overlapped.c(1288) : error C2099: initializer is not a constant
    overlapped.c(1289) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'char [12]'
    overlapped.c(1290) : error C2078: too many initializers
    overlapped.c(1310) : warning C4098: 'PyInit__overlapped' : 'void' function returning a value
    overlapped.c(1314) : warning C4098: 'PyInit__overlapped' : 'void' function returning a value
    overlapped.c(1317) : warning C4098: 'PyInit__overlapped' : 'void' function returning a value
    overlapped.c(1319) : warning C4013: 'PyModule_Create' undefined; assuming extern returning int
    overlapped.c(1319) : warning C4047: '=' : 'PyObject *' differs in levels of indirection from 'int'
    overlapped.c(1321) : warning C4098: 'PyInit__overlapped' : 'void' function returning a value
    overlapped.c(1336) : warning C4098: 'PyInit__overlapped' : 'void' function returning a value
    error: command 'C:\\Users\\marjoriet\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2

    ----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\marjor~1\\appdata\\local\\temp\\pip-build-uektzl\\asyncio\\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\marjor~1\appdata\local\temp\pip-zyzgic-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\marjor~1\appdata\local\temp\pip-build-uektzl\asyncio\`enter code here`

Solution

  • Asyncio long ditched support for 2.7

    It seems like there was a fork to provide support for Python 2.7 called trollius