You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When bazel builds a py3_image with pyyaml as one of its requirements it always fails with
File "/app/microservices/machineforge/manage.binary.runfiles/pypi__PyYAML_3_12/yaml/init.py", line 2, in
from error import *
ImportError: No module named 'error'
even though you specify python_version as attribute to it.
The reason is - bazel builds _yaml.so file (with pip install) which does not work with python3 based container py3_image (io_bazel_rules_docker). There are few other python packages like pyyaml which installs C-version of it (with .so files) by default if its dependent C-libs/devels are available in the host OS.
On the other side - building py3_image from python3 based host is also not possible because many python packages are NOT python3 compliant. It will fail with similar errors like
File "", line 544, in spec_from_file_location
File "/root/.cache/bazel/_bazel_root/2db3a13de410fd07a0f02c32e96a85ac/external/puller/file/downloaded/httplib2/init.py", line 988
raise socket.error, msg
^
SyntaxError: invalid syntax
so pip_install or pip_import should accept flags or options to skip building and installing C-bindings so that its possible to
This issue has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days.
Collaborators can add an assignee to keep this open indefinitely. Thanks for your contributions to rules_python!
When bazel builds a py3_image with pyyaml as one of its requirements it always fails with
even though you specify python_version as attribute to it.
The reason is - bazel builds
_yaml.so
file (with pip install) which does not work with python3 based container py3_image (io_bazel_rules_docker). There are few other python packages like pyyaml which installs C-version of it (with .so files) by default if its dependent C-libs/devels are available in the host OS.FYR, https://github.com/yaml/pyyaml
On the other side - building py3_image from python3 based host is also not possible because many python packages are NOT python3 compliant. It will fail with similar errors like
so pip_install or pip_import should accept flags or options to skip building and installing C-bindings so that its possible to
More details about the bug:
pypa/pip#2677
The text was updated successfully, but these errors were encountered: