Python安装' asyncio'错误:cl.exe失败,退出状态为2

时间:2017-06-27 23:01:31

标签: python discovery cl.exe

安装asyncio时遇到错误。 pydiscovery需要Asyncio。已安装Visual C ++ for Python 2.7但尚未解决此问题。可能是因为它与Windows 10不兼容?如果有人知道这个问题的解决方法,请帮助。

    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`

1 个答案:

答案 0 :(得分:1)

Asyncio长期支持2.7

似乎有一个fork来为Python 2.7提供名为trollius

的支持
相关问题