我已经安装了最新的 pip、python 3.12,还有什么没有..仍然显示此错误: “为收集的包构建轮子:grpcio-tools grpcio-tools 的构建轮子(setup.py):已启动 grpcio-tools 的构建轮(setup.py):完成状态为“错误” 错误:子进程退出并出现错误
python setup.py bdist_wheel did not run successfully.
exit code: 1
[101 lines of output]
C:\Users\nilab\AppData\Local\Temp\pip-install-i0cdhjus\grpcio-tools_b92530db0944414b912a68ceee125f69\setup.py:30: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-312
creating build\lib.win-amd64-cpython-312\grpc_tools
copying grpc_tools\command.py -> build\lib.win-amd64-cpython-312\grpc_tools
copying grpc_tools\protoc.py -> build\lib.win-amd64-cpython-312\grpc_tools
copying grpc_tools\__init__.py -> build\lib.win-amd64-cpython-312\grpc_tools
creating build\lib.win-amd64-cpython-312\grpc_tools\_proto
creating build\lib.win-amd64-cpython-312\grpc_tools\_proto\google
creating build\lib.win-amd64-cpython-312\grpc_tools\_proto\google\protobuf
copying grpc_tools\_proto\google\protobuf\any.proto -> build\lib.win-amd64-cpython-312\grpc_tools\_proto\google\protobuf
copying grpc_tools\_proto\google\protobuf\api.proto -> build\lib.win-amd64-cpython-312\grpc_tools\_proto\google\protobuf
copying grpc_tools\_proto\google\protobuf\duration.proto -> build\lib.win-amd64-cpython-312\grpc_tools\_proto\google\protobuf
copying grpc_tools\_proto\google\protobuf\empty.proto -> build\lib.win-amd64-cpython-312\grpc_tools\_proto\google\protobuf
copying grpc_tools\_proto\google\protobuf\field_mask.proto -> build\lib.win-amd64-cpython-312\grpc_tools\_proto\google\protobuf
copying grpc_tools\_proto\google\protobuf\source_context.proto -> build\lib.win-amd64-cpython-312\grpc_tools\_proto\google\protobuf
copying grpc_tools\_proto\google\protobuf\struct.proto -> build\lib.win-amd64-cpython-312\grpc_tools\_proto\google\protobuf
copying grpc_tools\_proto\google\protobuf\timestamp.proto -> build\lib.win-amd64-cpython-312\grpc_tools\_proto\google\protobuf
copying grpc_tools\_proto\google\protobuf\type.proto -> build\lib.win-amd64-cpython-312\grpc_tools\_proto\google\protobuf
copying grpc_tools\_proto\google\protobuf\wrappers.proto -> build\lib.win-amd64-cpython-312\grpc_tools\_proto\google\protobuf
creating build\lib.win-amd64-cpython-312\grpc_tools\_proto\google\protobuf\compiler
copying grpc_tools\_proto\google\protobuf\compiler\plugin.proto -> build\lib.win-amd64-cpython-312\grpc_tools\_proto\google\protobuf\compiler
copying grpc_tools\_proto\google\protobuf\descriptor.proto -> build\lib.win-amd64-cpython-312\grpc_tools\_proto\google\protobuf
running build_ext
building 'grpc_tools._protoc_compiler' extension
creating build\temp.win-amd64-cpython-312
creating build\temp.win-amd64-cpython-312\Release
creating build\temp.win-amd64-cpython-312\Release\grpc_root
creating build\temp.win-amd64-cpython-312\Release\grpc_root\src
creating build\temp.win-amd64-cpython-312\Release\grpc_root\src\compiler
creating build\temp.win-amd64-cpython-312\Release\grpc_tools
creating build\temp.win-amd64-cpython-312\Release\third_party
creating build\temp.win-amd64-cpython-312\Release\third_party\protobuf
creating build\temp.win-amd64-cpython-312\Release\third_party\protobuf\src
creating build\temp.win-amd64-cpython-312\Release\third_party\protobuf\src\google
creating build\temp.win-amd64-cpython-312\Release\third_party\protobuf\src\google\protobuf
creating build\temp.win-amd64-cpython-312\Release\third_party\protobuf\src\google\protobuf\compiler
creating build\temp.win-amd64-cpython-312\Release\third_party\protobuf\src\google\protobuf\compiler\cpp
creating build\temp.win-amd64-cpython-312\Release\third_party\protobuf\src\google\protobuf\compiler\csharp
creating build\temp.win-amd64-cpython-312\Release\third_party\protobuf\src\google\protobuf\compiler\java
creating build\temp.win-amd64-cpython-312\Release\third_party\protobuf\src\google\protobuf\compiler\objectivec
creating build\temp.win-amd64-cpython-312\Release\third_party\protobuf\src\google\protobuf\compiler\php
creating build\temp.win-amd64-cpython-312\Release\third_party\protobuf\src\google\protobuf\compiler\python
creating build\temp.win-amd64-cpython-312\Release\third_party\protobuf\src\google\protobuf\compiler\ruby
creating build\temp.win-amd64-cpython-312\Release\third_party\protobuf\src\google\protobuf\io
creating build\temp.win-amd64-cpython-312\Release\third_party\protobuf\src\google\protobuf\stubs
creating build\temp.win-amd64-cpython-312\Release\third_party\protobuf\src\google\protobuf\util
creating build\temp.win-amd64-cpython-312\Release\third_party\protobuf\src\google\protobuf\util\internal
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DWIN32_LEAN_AND_MEAN=1 -DMS_WIN64=1 -I. -Igrpc_root -Igrpc_root\include -Ithird_party\protobuf\src -IE:\Switch_Plan\Python\myenv\include -IC:\Users\nilab\AppData\Local\Programs\Python\Python312\include -IC:\Users\nilab\AppData\Local\Programs\Python\Python312\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tpgrpc_root\src\compiler\proto_parser_helper.cc /Fobuild\temp.win-amd64-cpython-312\Release\grpc_root\src\compiler\proto_parser_helper.obj -std=c++14 /MT
cl : Command line warning D9025 : overriding '/MD' with '/MT'
cl : Command line warning D9002 : ignoring unknown option '-std=c++14'
proto_parser_helper.cc
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DWIN32_LEAN_AND_MEAN=1 -DMS_WIN64=1 -I. -Igrpc_root -Igrpc_root\include -Ithird_party\protobuf\src -IE:\Switch_Plan\Python\myenv\include -IC:\Users\nilab\AppData\Local\Programs\Python\Python312\include -IC:\Users\nilab\AppData\Local\Programs\Python\Python312\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tpgrpc_root\src\compiler\python_generator.cc /Fobuild\temp.win-amd64-cpython-312\Release\grpc_root\src\compiler\python_generator.obj -std=c++14 /MT
cl : Command line warning D9025 : overriding '/MD' with '/MT'
cl : Command line warning D9002 : ignoring unknown option '-std=c++14'
python_generator.cc
grpc_root\src/compiler/python_generator_helpers.h(104): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
grpc_root\src/compiler/python_generator_helpers.h(104): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data
grpc_root\src\compiler\python_generator.cc(852): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
grpc_root\src\compiler\python_generator.cc(893): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
grpc_root\src\compiler\python_generator.cc(893): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DWIN32_LEAN_AND_MEAN=1 -DMS_WIN64=1 -I. -Igrpc_root -Igrpc_root\include -Ithird_party\protobuf\src -IE:\Switch_Plan\Python\myenv\include -IC:\Users\nilab\AppData\Local\Programs\Python\Python312\include -IC:\Users\nilab\AppData\Local\Programs\Python\Python312\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tpgrpc_tools\_protoc_compiler.cpp /Fobuild\temp.win-amd64-cpython-312\Release\grpc_tools\_protoc_compiler.obj -std=c++14 /MT
cl : Command line warning D9025 : overriding '/MD' with '/MT'
cl : Command line warning D9002 : ignoring unknown option '-std=c++14'
_protoc_compiler.cpp
C:\Users\nilab\AppData\Local\Programs\Python\Python312\include\pyconfig.h(130): warning C4005: 'MS_WIN64': macro redefinition
C:\Users\nilab\AppData\Local\Programs\Python\Python312\include\pyconfig.h(130): note: 'MS_WIN64' previously declared on the command line
grpc_tools\_protoc_compiler.cpp(2181): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'int', possible loss of data
grpc_tools\_protoc_compiler.cpp(3749): warning C4996: 'PyDictObject::ma_version_tag': deprecated in 3.12
grpc_tools\_protoc_compiler.cpp(3889): warning C4996: 'PyDictObject::ma_version_tag': deprecated in 3.12
grpc_tools\_protoc_compiler.cpp(4048): warning C4996: 'PyDictObject::ma_version_tag': deprecated in 3.12
grpc_tools\_protoc_compiler.cpp(4157): warning C4996: 'PyDictObject::ma_version_tag': deprecated in 3.12
grpc_tools\_protoc_compiler.cpp(6363): warning C4996: 'PyDictObject::ma_version_tag': deprecated in 3.12
grpc_tools\_protoc_compiler.cpp(7110): warning C4996: 'PyDictObject::ma_version_tag': deprecated in 3.12
grpc_tools\_protoc_compiler.cpp(7122): warning C4996: 'PyDictObject::ma_version_tag': deprecated in 3.12
grpc_tools\_protoc_compiler.cpp(7126): warning C4996: 'PyDictObject::ma_version_tag': deprecated in 3.12
grpc_tools\_protoc_compiler.cpp(7143): warning C4996: 'PyDictObject::ma_version_tag': deprecated in 3.12
grpc_tools\_protoc_compiler.cpp(7336): error C2039: 'curexc_traceback': is not a member of '_ts'
C:\Users\nilab\AppData\Local\Programs\Python\Python312\include\cpython/pystate.h(115): note: see declaration of '_ts'
grpc_tools\_protoc_compiler.cpp(7339): error C2039: 'curexc_traceback': is not a member of '_ts'
C:\Users\nilab\AppData\Local\Programs\Python\Python312\include\cpython/pystate.h(115): note: see declaration of '_ts'
grpc_tools\_protoc_compiler.cpp(8239): warning C4996: 'PyDictObject::ma_version_tag': deprecated in 3.12
grpc_tools\_protoc_compiler.cpp(8540): error C2039: 'ob_digit': is not a member of '_longobject'
C:\Users\nilab\AppData\Local\Programs\Python\Python312\include\cpython/longintrepr.h(87): note: see declaration of '_longobject'
grpc_tools\_protoc_compiler.cpp(8595): error C2039: 'ob_digit': is not a member of '_longobject'
C:\Users\nilab\AppData\Local\Programs\Python\Python312\include\cpython/longintrepr.h(87): note: see declaration of '_longobject'
grpc_tools\_protoc_compiler.cpp(8774): error C2039: 'ob_digit': is not a member of '_longobject'
C:\Users\nilab\AppData\Local\Programs\Python\Python312\include\cpython/longintrepr.h(87): note: see declaration of '_longobject'
grpc_tools\_protoc_compiler.cpp(8829): error C2039: 'ob_digit': is not a member of '_longobject'
C:\Users\nilab\AppData\Local\Programs\Python\Python312\include\cpython/longintrepr.h(87): note: see declaration of '_longobject'
grpc_tools\_protoc_compiler.cpp(8970): error C2039: 'ob_digit': is not a member of '_longobject'
C:\Users\nilab\AppData\Local\Programs\Python\Python312\include\cpython/longintrepr.h(87): note: see declaration of '_longobject'
grpc_tools\_protoc_compiler.cpp(9025): error C2039: 'ob_digit': is not a member of '_longobject'
C:\Users\nilab\AppData\Local\Programs\Python\Python312\include\cpython/longintrepr.h(87): note: see declaration of '_longobject'
grpc_tools\_protoc_compiler.cpp(10675): error C2039: 'ob_digit': is not a member of '_longobject'
C:\Users\nilab\AppData\Local\Programs\Python\Python312\include\cpython/longintrepr.h(87): note: see declaration of '_longobject'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.39.33519\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for grpcio-tools
Running setup.py clean for grpcio-tools
Failed to build grpcio-tools
ERROR: Could not build wheels for grpcio-tools, which is required to install pyproject.toml-based projects
[end of output]
注意:此错误源自子进程,并且可能不是 pip 的问题。 错误:子进程退出并出现错误
× 用于安装构建依赖项的 pip 子进程未成功运行。 │ 退出代码:1 ╰─> 请参阅上面的输出。
注意:此错误源自子进程,可能不是 pip 的问题。”
我一直致力于通过本地计算机创建从 GCS 到 BigQuery 的数据管道。请帮我解决这个问题。
我已经安装了最新的pip,尝试重新安装最新的python版本并添加路径,安装了microsoft c++工具,但仍然不起作用。
截至今天,apache-beam
2.55.1
版本支持 python 3.8, 3.9, 3.10, 3.11
而不是 3.12
版本。
来源:https://cloud.google.com/dataflow/docs/support/beam-runtime-support#python