Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the version of python and g++ #9

Open
YinghanUVA opened this issue Sep 15, 2023 · 3 comments
Open

What is the version of python and g++ #9

YinghanUVA opened this issue Sep 15, 2023 · 3 comments

Comments

@YinghanUVA
Copy link

Dear Author,

I'm running into errors while test building this command line: bazel run //monolith/native_training:demo --output_filter=IGNORE_LOGS. The error message looks like the following. I suspect this is related to python and c/c++ version diff. Could you please kindly share the versions that you are currently using for python and g++? Many thanks!

/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/BUILD.bazel:5:1: C++ compilation of rule '@com_github_grpc_grpc//src/python/grpcio/grpc/_cython:cygrpc.so' failed (Exit 1)
bazel-out/k8-opt/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp: In function 'PyObject* __pyx_f_4grpc_7_cython_6cygrpc__initialize()':
bazel-out/k8-opt/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:81271:29: warning: 'void PyEval_InitThreads()' is deprecated [-Wdeprecated-declarations]
81271 |   (void)(PyEval_InitThreads());
      |                             ^
In file included from bazel-out/k8-opt/bin/external/local_config_python/python_include/Python.h:145,
                 from bazel-out/k8-opt/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:4:
bazel-out/k8-opt/bin/external/local_config_python/python_include/ceval.h:130:37: note: declared here
@hanzhi713
Copy link
Collaborator

Python 3.8.6 and gcc 8.3 should work

@YinghanUVA
Copy link
Author

Thanks Hanzhi, after updating python and gcc version, I'm able to get this build complete result. But looks like the numpy version is still not compatible. Could you please share the numpy version that you are using? Is the check failure related to numpy? I'm currently using numpy==1.23.0.

INFO: 17487 processes: 17487 local.
INFO: Build completed successfully, 18758 total actions
INFO: Build completed successfully, 18758 total actions
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xd
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xd
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xd
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xd
ImportError: numpy.core._multiarray_umath failed to import
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xd
ImportError: numpy.core.umath failed to import
ImportError: numpy.core._multiarray_umath failed to import
ImportError: numpy.core.umath failed to import
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xd
ImportError: numpy.core._multiarray_umath failed to import
ImportError: numpy.core.umath failed to import
2023-10-04 00:40:08.039674: F external/org_tensorflow/tensorflow/python/lib/core/bfloat16.cc:714] Check failed: PyBfloat16_Type.tp_base != nullptr
2023-10-04 00:40:08.039684: F external/org_tensorflow/tensorflow/python/lib/core/bfloat16.cc:714] Check failed: PyBfloat16_Type.tp_base != nullptr
2023-10-04 00:40:08.040239: F external/org_tensorflow/tensorflow/python/lib/core/bfloat16.cc:714] Check failed: PyBfloat16_Type.tp_base != nullptr
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xd
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xd
ImportError: numpy.core._multiarray_umath failed to import
ImportError: numpy.core.umath failed to import
2023-10-04 00:40:09.635845: F external/org_tensorflow/tensorflow/python/lib/core/bfloat16.cc:714] Check failed: PyBfloat16_Type.tp_base != nullptr```

@hanzhi713
Copy link
Collaborator

We use numpy 1.19.4 in our production builds. Numpy >= 1.20 may give the error above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants