Can't install Scrapy on PC regarding multiple steps

删除回忆录丶 提交于 2021-01-05 11:10:52

问题


I am trying to install scrapy on PC but keep getting error messages.

I tried to install Microsoft Visual Studio and other types of things, but NOTHING works :(

 src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(2229): warning C4047: '=': '__pyx_t_11iocpsupport_HANDLE' differs in levels of indirection from 'HANDLE'
src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(2377): warning C4022: 'CreateIoCompletionPort': pointer mismatch for actual parameter 1
src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(2377): warning C4022: 'CreateIoCompletionPort': pointer mismatch for actual parameter 2
src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(2377): warning C4047: '=': '__pyx_t_11iocpsupport_HANDLE' differs in levels of indirection from 'HANDLE'
src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(2492): warning C4022: 'GetQueuedCompletionStatus': pointer mismatch for actual parameter 1
src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(2838): warning C4022: 'PostQueuedCompletionStatus': pointer mismatch for actual parameter 1
src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(2949): warning C4022: 'CloseHandle': pointer mismatch for actual parameter 1
src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(3292): warning C4996: 'PyObject_AsReadBuffer': deprecated in 3.0
src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(4932): warning C4996: 'PyObject_AsWriteBuffer': deprecated in 3.0
src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(5149): warning C4996: 'PyObject_AsReadBuffer': deprecated in 3.0
src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(5786): warning C4996: 'PyObject_AsWriteBuffer': deprecated in 3.0
src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(6146): warning C4996: 'PyObject_AsWriteBuffer': deprecated in 3.0
src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(6164): warning C4996: 'PyObject_AsWriteBuffer': deprecated in 3.0
src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(6182): warning C4996: 'PyObject_AsWriteBuffer': deprecated in 3.0
src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(6509): warning C4996: 'PyObject_AsReadBuffer': deprecated in 3.0
src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(7614): error C2039: 'tp_print': is not a member of '_typeobject'
c:\users\emeron\appdata\local\programs\python\python39\include\cpython/object.h(193): note: see declaration of '_typeobject'
src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(8421): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3
src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(8437): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29333\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2

回答1:


The tp_print method was removed from the API in Python 3.8. Error "'tp_print': is not a member of '_typeobject'" means that the code is intended for Python <= 3.8. Downgrade to Python 3.8 and try again.

Currently at version 20.3.0 Twisted provides wheels up to Python 3.7 so may be you should downgrade even further.

PS. Never hurry to a newer major version of Python, wait until all your 3rd-party libraries adapt.



来源:https://stackoverflow.com/questions/65453835/cant-install-scrapy-on-pc-regarding-multiple-steps

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!