Cross-compiled Python cannot find basic modules (math, operator, etc.)

I can not import any of the base modules in the lib-dynload directory. They are all there, but I get an error: "ImportError: No module named X"when I try to import them.

I checked my own sys.pathand included in it the directory where all these modules are located, and my PYTHONHOME environment variable is set correctly. I am losing a bit, which can be a problem. Some background information. This is a cross-compilation from a Python 2.6.6 source and installation on a built-in ARM board with Angstrom support.

It used to have python, I tried to bake it in the image, but it lacked a lot of material. In the end, I did my best to clear the directory tree from the previous python before loading it onto my crossed compiled version.

A straightforward simple script that just tries to import math: http://pastebin.com/3XgJ3nPR

+5
source share
2 answers

I do not see checks in this trace for file names, such as math.soor mathmodule.so, which may indicate that modules with shared objects are completely disabled - that the version of Python you compiled cannot dynamically load binary modules.

: config.out Python, , Python , , .so:

checking for dlopen... yes
checking DYNLOADFILE... dynload_shlib.o
checking MACHDEP_OBJS... MACHDEP_OBJS

-?

+2

Python 2.7.13, , , ​​ Python 3, 2. (setup.py) , (sys.builtin_module_names); setup.py ( Makefile) python2.7, (Ubuntu), , , , python ( ), , , .

( python2.7 → python). , python x86 x64; , ARM, , , -.

0

All Articles