Skip to content

numpy not properly built when using python3 #190

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

Closed
rnburn opened this issue May 26, 2019 · 3 comments
Closed

numpy not properly built when using python3 #190

rnburn opened this issue May 26, 2019 · 3 comments

Comments

@rnburn
Copy link

rnburn commented May 26, 2019

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?

@rnburn
Copy link
Author

rnburn commented May 27, 2019

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.

@thundergolfer
Copy link

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.

@brandjon
Copy link
Contributor

Dedupping to #249.

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

3 participants