[pypy-issue] Issue #3041: pypy3 import numpy fails unknown symbol PyGILState_Check (pypy/pypy)

Johan Jönsson issues-reply at bitbucket.org
Mon Jul 8 09:43:48 EDT 2019


New issue 3041: pypy3 import numpy fails unknown symbol PyGILState_Check
https://bitbucket.org/pypy/pypy/issues/3041/pypy3-import-numpy-fails-unknown-symbol

Johan Jönsson:

I am trying to install numpy \(both from source and via pip\). With pypy-7.1.1-beta0 \(from the gentoo repositories\) I can build/install numpy, however when I try to import numpy i get the following output

```
Python 3.6.1 (784b254d669919c872a505b807db8462b6140973, Jul 07 2019, 15:05:37)
[PyPy 7.1.1-beta0 with GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``it's nonsense all the way down,
and also all the way up''
>>>> import numpy
Traceback (most recent call last):
  File ".local/lib/pypy3.6/site-packages/numpy/core/__init__.py", line 17, in <module>
    from . import multiarray
  File ".local/lib/pypy3.6/site-packages/numpy/core/multiarray.py", line 14, in <module>
    from . import overrides
  File ".local/lib/pypy3.6/site-packages/numpy/core/overrides.py", line 7, in <module>
    from numpy.core._multiarray_umath import (
ImportError: .local/lib/pypy3.6/site-packages/numpy/core/_multiarray_umath.pypy3-71-x86_64-linux-gnu.so: undefined symbol: PyGILState_Check

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "~/.local/lib/pypy3.6/site-packages/numpy/__init__.py", line 142, in <module>
    from . import core
  File ".local/lib/pypy3.6/site-packages/numpy/core/__init__.py", line 47, in <module>
    raise ImportError(msg)
ImportError: 

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy c-extensions failed.
- Try uninstalling and reinstalling numpy.
- If you have already done that, then:
  1. Check that you expected to use Python3.6 from "/usr/bin/pypy3",
     and that you have no directories in your PATH or PYTHONPATH that can
     interfere with the Python and numpy version "1.18.0.dev0+48efcc7" you're trying to use.
  2. If (1) looks fine, you can open a new issue at
     https://github.com/numpy/numpy/issues.  Please include details on:
     - how you installed Python
     - how you installed numpy
     - your operating system
     - whether or not you have multiple versions of Python installed
     - if you built from source, your compiler versions and ideally a build log

- If you're working with a numpy git repository, try `git clean -xdf`
  (removes all files not under version control) and rebuild numpy.

Note: this error has many possible causes, so please don't comment on
an existing issue about this - open a new one instead.

Original error was: ~/.local/lib/pypy3.6/site-packages/numpy/core/_multiarray_umath.pypy3-71-x86_64-linux-gnu.so: undefined symbol: PyGILState_Check
```




More information about the pypy-issue mailing list