Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation fails on apt-installed Sage #1

Closed
bernalde opened this issue Jul 31, 2019 · 1 comment
Closed

Installation fails on apt-installed Sage #1

bernalde opened this issue Jul 31, 2019 · 1 comment

Comments

@bernalde
Copy link

When executing sage setup.py test I get the following error:

fgb_sage/_fgb_sage_int.pyx: cannot find cimported module 'sage.cpython.string'
Compiling fgb_sage/_fgb_sage_int.pyx because it changed.
[1/1] Cythonizing fgb_sage/_fgb_sage_int.pyx

Error compiling Cython file:
------------------------------------------------------------
...
# distutils: language = c++

# _fgb_int.pyx is source file,
# _fgb_modp.pyx is auto-generated!
from sage.cpython.string cimport str_to_bytes
^
------------------------------------------------------------

fgb_sage/_fgb_sage_int.pyx:5:0: 'sage/cpython/string.pxd' not found

Error compiling Cython file:
------------------------------------------------------------
...
# distutils: language = c++

# _fgb_int.pyx is source file,
# _fgb_modp.pyx is auto-generated!
from sage.cpython.string cimport str_to_bytes
^
------------------------------------------------------------

fgb_sage/_fgb_sage_int.pyx:5:0: 'sage/cpython/string/str_to_bytes.pxd' not found

Error compiling Cython file:
------------------------------------------------------------
...
        self.variables = <char**> PyMem_Malloc(self.n_variables * sizeof(char*))
        self.exponents = <I32*> PyMem_Malloc(self.n_variables * sizeof(I32*))
        if not self.input_basis or not self.output_basis or not self.variables or not self.exponents:
            raise MemoryError()

        self.pystr_variables = [str_to_bytes(x) for x in
                                           ^
------------------------------------------------------------

fgb_sage/_fgb_sage_int.pyx:146:44: 'str_to_bytes' is not a constant, variable or function identifier
Traceback (most recent call last):
  File "setup.py", line 156, in <module>
    for (name, libmode) in PYX_FILES]
  File "/usr/lib/python2.7/dist-packages/Cython/Build/Dependencies.py", line 1027, in cythonize
    cythonize_one(*args)
  File "/usr/lib/python2.7/dist-packages/Cython/Build/Dependencies.py", line 1149, in cythonize_one
    raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: fgb_sage/_fgb_sage_int.pyx

I tried resolving it by myself but was not successful. I'm running an Ubuntu 18.04 machine with Sage v. 8.1 installed through apt-get.

@bernalde
Copy link
Author

bernalde commented Aug 1, 2019

Resolved by reinstalling Sage. I first installed it through apt-get and now after using the binaries, it works.

@bernalde bernalde closed this as completed Aug 1, 2019
@mwageringel mwageringel changed the title Error while trying to install Installation fails on apt-installed Sage Jul 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant