Why can't Sage Python3 find Cython?

asked 2023-02-04 22:58:59 +0200

Louis D gravatar image

updated 2023-06-17 13:11:31 +0200

FrédéricC gravatar image

I am trying to use the Sage Python3 to compile some Cython code. I'm doing this because the code does use some libraries from Sage, of course, but I'm not even getting that far. I give this at the command line:

/Applications/SageMath-8.1.app/sage --python3 setup.py build_ext

In return I get:

Traceback (most recent call last):
  File "setup.py", line 15, in <module>
    from Cython.Build import cythonize
ModuleNotFoundError: No module named 'Cython'

Well, line 15 does say this:

from Cython.Build import cythonize

Okay. But if I fire up Sage itself (at the command line) and just type in the above line, it works fine; that is, it finds the Cython module with no problems.

I might be fundamentally missing something about the linking process here. But I'm not sure what.

Is there anyone who can help? My gratitude in advance!

edit retag flag offensive close merge delete