While running pip install python-qpid-proton I got the following errors:
error: Microsoft Visual C++ 14.0 or greater is required.
I fixed this by installing Visual Studio Build Tools 2022 and Visual Studio Professional 2022fatal error C1083: Cannot open compiler generated file
This error appears apparently if the path is too long. Therefore I changed the path of the Temp folder to a shorter path. I have done this by creating a new folder under C:WindowsTEMP and changed setting the following environmental variables:
TEMP=C:TEMP and TMP=C:TEMPAfter these two steps I get a different error. Has someone an idea how to solve this? Maybe there is also a different way to install python-qpid-proton on windows? I would appreciate that a lot…
The error comes after a lot of warnings in this form
C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dsrccorebuffer.c(279): warning C4267: '+=': conversion from 'size_t' to 'unsigned int', possible loss of data C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dsrccorebuffer.c(280): warning C4267: '-=': conversion from 'size_t' to 'unsigned int', possible loss of data C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dsrccorebuffer.c(273): warning C4267: 'initializing': conversion from 'size_t' to 'unsigned int', possible loss of data
Then there are the errors:
cproton_wrap.c C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/object.h(242): error C2061: syntax error: identifier 'pn_list_index' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/object.h(242): error C2059: syntax error: ';' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/object.h(242): error C2059: syntax error: '<parameter -list>' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/object.h(280): error C2061: syntax error: identifier 'pn_string_put' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/object.h(280): error C2059: syntax error: ';' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/object.h(280): error C2059: syntax error: '<parameter -list>' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/codec.h(546): error C2061: syntax error: identifier ' pn_data_encode' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/codec.h(546): error C2059: syntax error: ';' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/codec.h(546): error C2059: syntax error: '<parameter- list>' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/codec.h(555): error C2061: syntax error: identifier ' pn_data_encoded_size' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/codec.h(555): error C2059: syntax error: ';' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/codec.h(555): error C2059: syntax error: '<parameter- list>' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/codec.h(574): error C2061: syntax error: identifier ' pn_data_decode' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/codec.h(574): error C2059: syntax error: ';' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/codec.h(574): error C2059: syntax error: '<parameter- list>' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/link.h(587): error C2061: syntax error: identifier 'p n_link_send' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/link.h(587): error C2059: syntax error: ';' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/link.h(587): error C2059: syntax error: '<parameter-l ist>' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/link.h(640): error C2061: syntax error: identifier 'p n_link_recv' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/link.h(640): error C2059: syntax error: ';' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/link.h(640): error C2059: syntax error: '<parameter-l ist>' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/transport.h(489): error C2061: syntax error: identifi er 'pn_transport_input' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/transport.h(489): error C2059: syntax error: ';' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/transport.h(489): error C2059: syntax error: '<parame ter-list>' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/transport.h(494): error C2061: syntax error: identifi er 'pn_transport_output' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/transport.h(494): error C2059: syntax error: ';' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/transport.h(494): error C2059: syntax error: '<parame ter-list>' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/transport.h(513): error C2061: syntax error: identifi er 'pn_transport_capacity' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/transport.h(513): error C2059: syntax error: ';' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/transport.h(513): error C2059: syntax error: '<parame ter-list>' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/transport.h(546): error C2061: syntax error: identifi er 'pn_transport_push' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/transport.h(546): error C2059: syntax error: ';' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/transport.h(546): error C2059: syntax error: '<parame ter-list>' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/transport.h(593): error C2061: syntax error: identifier 'pn_transport_pending' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/transport.h(593): error C2059: syntax error: ';' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/transport.h(593): error C2059: syntax error: '<parame ter-list>' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/transport.h(625): error C2061: syntax error: identifi er 'pn_transport_peek' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/transport.h(625): error C2059: syntax error: ';' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/transport.h(625): error C2059: syntax error: '<parame ter-list>' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/message.h(752): error C2061: syntax error: identifier 'pn_message_encode2' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/message.h(752): error C2059: syntax error: ';' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/message.h(752): error C2059: syntax error: '<paramete r-list>' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/message.h(777): error C2061: syntax error: identifier 'pn_message_send' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/message.h(777): error C2059: syntax error: ';' C:Temppip-install-rv64pyj0python-qpid-proton_043295171d11447ab93794ab575dd56dincludeproton/message.h(777): error C2059: syntax error: '<paramete r-list>' cproton_wrap.c(3131): error C2061: syntax error: identifier 'wrap_pn_link_recv' cproton_wrap.c(3131): error C2059: syntax error: ';' cproton_wrap.c(3131): error C2059: syntax error: '<parameter-list>' cproton_wrap.c(3142): error C2061: syntax error: identifier 'wrap_pn_transport_peek' cproton_wrap.c(3142): error C2059: syntax error: ';' cproton_wrap.c(3142): error C2059: syntax error: '<parameter-list>' cproton_wrap.c(3191): error C2061: syntax error: identifier 'wrap_pn_data_encode' cproton_wrap.c(3191): error C2059: syntax error: ';' cproton_wrap.c(3191): error C2059: syntax error: '<parameter-list>' cproton_wrap.c(3760): error C2065: 'ssize_t': undeclared identifier cproton_wrap.c(3760): error C2146: syntax error: missing ';' before identifier 'result' cproton_wrap.c(3760): error C2065: 'result': undeclared identifier cproton_wrap.c(3784): error C2065: 'result': undeclared identifier cproton_wrap.c(3784): error C2065: 'ssize_t': undeclared identifier cproton_wrap.c(3784): error C2146: syntax error: missing ';' before identifier 'pn_link_send' cproton_wrap.c(3784): warning C4013: 'pn_link_send' undefined; assuming extern returning int cproton_wrap.c(3787): error C2065: 'result': undeclared identifier cproton_wrap.c(3806): error C2065: 'ssize_t': undeclared identifier cproton_wrap.c(3806): error C2146: syntax error: missing ';' before identifier 'result' cproton_wrap.c(3806): error C2065: 'result': undeclared identifier cproton_wrap.c(3824): error C2065: 'result': undeclared identifier cproton_wrap.c(3824): error C2065: 'ssize_t': undeclared identifier cproton_wrap.c(3824): error C2146: syntax error: missing ';' before identifier 'wrap_pn_link_recv' cproton_wrap.c(3824): warning C4013: 'wrap_pn_link_recv' undefined; assuming extern returning int cproton_wrap.c(3827): error C2065: 'result': undeclared identifier cproton_wrap.c(3845): error C2065: 'ssize_t': undeclared identifier cproton_wrap.c(3845): error C2146: syntax error: missing ';' before identifier 'result' cproton_wrap.c(3845): error C2065: 'result': undeclared identifier cproton_wrap.c(3869): error C2065: 'result': undeclared identifier cproton_wrap.c(3869): error C2065: 'ssize_t': undeclared identifier cproton_wrap.c(3869): error C2146: syntax error: missing ';' before identifier 'pn_transport_push' cproton_wrap.c(3869): warning C4013: 'pn_transport_push' undefined; assuming extern returning int cproton_wrap.c(3872): error C2065: 'result': undeclared identifier cproton_wrap.c(3891): error C2065: 'ssize_t': undeclared identifier cproton_wrap.c(3891): error C2146: syntax error: missing ';' before identifier 'result' cproton_wrap.c(3891): error C2065: 'result': undeclared identifier cproton_wrap.c(3909): error C2065: 'result': undeclared identifier cproton_wrap.c(3909): error C2065: 'ssize_t': undeclared identifier cproton_wrap.c(3909): error C2146: syntax error: missing ';' before identifier 'wrap_pn_transport_peek' cproton_wrap.c(3909): warning C4013: 'wrap_pn_transport_peek' undefined; assuming extern returning int cproton_wrap.c(3912): error C2065: 'result': undeclared identifier cproton_wrap.c(4005): error C2065: 'ssize_t': undeclared identifier cproton_wrap.c(4005): error C2146: syntax error: missing ';' before identifier 'result' cproton_wrap.c(4005): error C2065: 'result': undeclared identifier cproton_wrap.c(4029): error C2065: 'result': undeclared identifier cproton_wrap.c(4029): error C2065: 'ssize_t': undeclared identifier cproton_wrap.c(4029): error C2146: syntax error: missing ';' before identifier 'pn_data_decode' cproton_wrap.c(4029): warning C4013: 'pn_data_decode' undefined; assuming extern returning int cproton_wrap.c(4032): error C2065: 'result': undeclared identifier cproton_wrap.c(4051): error C2065: 'ssize_t': undeclared identifier cproton_wrap.c(4051): error C2146: syntax error: missing ';' before identifier 'result' cproton_wrap.c(4051): error C2065: 'result': undeclared identifier cproton_wrap.c(4069): error C2065: 'result': undeclared identifier cproton_wrap.c(4069): error C2065: 'ssize_t': undeclared identifier cproton_wrap.c(4069): error C2146: syntax error: missing ';' before identifier 'wrap_pn_data_encode' cproton_wrap.c(4069): warning C4013: 'wrap_pn_data_encode' undefined; assuming extern returning int cproton_wrap.c(4072): error C2065: 'result': undeclared identifier cproton_wrap.c(12214): error C2065: 'ssize_t': undeclared identifier cproton_wrap.c(12214): error C2146: syntax error: missing ';' before identifier 'result' cproton_wrap.c(12214): error C2065: 'result': undeclared identifier cproton_wrap.c(12234): error C2065: 'result': undeclared identifier cproton_wrap.c(12234): error C2065: 'ssize_t': undeclared identifier cproton_wrap.c(12234): fatal error C1003: error count exceeds 100; stopping compilation error: command 'C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.32.31326\bin\HostX86\x64\cl.exe' failed with exit code 2`
Advertisement
Answer
I fixed the last error by using Python 3.9 instead of Python 3.10. Apparently python-qpid-proton 0.37.0 is only compatible with Python 3.9.