facebookincubator / cinder

Cinder is Meta's internal performance-oriented production version of CPython.
https://trycinder.com
Other
3.49k stars 121 forks source link

Missing builtin modules such as math #14

Closed Mng-dev-ai closed 3 years ago

Mng-dev-ai commented 3 years ago

Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.8/random.py", line 41, in from math import log as _log, exp as _exp, pi as _pi, e as _e, ceil as _ceil ModuleNotFoundError: No module named 'math'

carljm commented 3 years ago

Cinder definitely has a working math module :) Judging from the path in your traceback, it seems that you are trying to run a Cinder binary with a sys.path that is pointing to the standard library from some other Python installation, and the extension tags for compiled .so modules likely won't match, causing this error. Hard to debug exactly why this is without knowing how you've compiled Cinder and exactly how you are running it, but you need to make sure Cinder is using the Cinder standard library, not the standard library from some other Python on your system.