Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Why can't Sage Python3 find Cython?

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!

Why can't Sage Python3 find Cython?

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!

click to hide/show revision 3
retagged

Why can't Sage Python3 find Cython?

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!