Skip to content

numpy not properly built when using python3 #190

Closed

Description

@rnburn

If I set up a pip requirement for numpy, I get this error when using python3

ImportError: pypi__numpy_1_16_3/numpy/core/_multiarray_umath.so: undefined symbol: _Py_ZeroStruct

My guess is that the extension module is not being built correctly (See these comments).

Here are the details of my bazel setup

I added a python runtime for python3

# ci/BUILD
py_runtime(
    name = "python3",
    interpreter_path = "/usr/bin/python3",
)

And I force python3 to be used by adding the following to my .bazelrc

# .bazelrc
build --python_top=//ci:python3
run --python_top=//ci:python3
test --python_top=//ci:python3

Is there anything I can do to fix this?

Activity

  1. rnburn commented on May 27, 2019

    @rnburn
    Author

    I was able to get numpy to work with python3 by using the fork in PR #85 with pip3_import.

    I hope you guys will prioritize getting that merged in.

  2. thundergolfer commented on Oct 22, 2019

    @thundergolfer

    This is closely related to a few other issues, which have the pip_import Python3 issue at their root. See: #220 (comment)

    I reckon this can be closed as a dupe.

  3. brandjon commented on Nov 12, 2019

    @brandjon
    Contributor

    Dedupping to #249.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions