How are characters contained in libpythonX.X related to numpy extension dynamic libraries?

I am currently having a problem where I can use and import numpyin an interpreter environment, but I cannot import or use numpyfrom Python built into C/C++. So I'm curious how much numpyextension libraries, in particular,

numpy/core/multiarray.cpython-35m-x86_64-linux-gnu.so

associated with standard Python package characters (per PyExc_UserWarningcharacter PyExc_UserWarning). My current error output says that PyExc_UserWarning is undefined. This symbol exists in libpythonX.Ymsoas I confirmed using the command nm. I ran

ldd multiarray.cpython-35m-x86_64-linux-gnu.so

and got the following output:

Console output

, , . numpy multiarray.cpython-35m-x86_64-linux-gnu.so , multiarray ?

, . , !

. . , , , , , python Python C/C++.

+

  • Ubuntu 16.04, 64
  • Python 3.5.5
  • numpy-1.14.2 pip 9.0.0 pip3.5 install numpy

16/16/18:

, .

4/17/18:

; , .

+8
1

multiarray.cpython-35m-x86_64-linux-gnu.so python, libpythonx.xx ldd.

nm , , PyExc_UserWarning .

, numpy , dlopen, . , , libdl.so . , , dlopen RTLD_NOW, .

, python , python libpython.xxso.

0

Source: https://habr.com/ru/post/1696081/


All Articles