I am using a linux system with python3. I got the following error while installing it. Any help is appreciated.
ERROR: Command errored out with exit status 1:
command: /home/bhbi3159/anaconda3/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-x3ppkehx/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-x3ppkehx/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-req-build-x3ppkehx/pip-egg-info
cwd: /tmp/pip-req-build-x3ppkehx/
Complete output (177 lines):
Compiling gsum/cutils.pyx because it changed.
[1/1] Cythonizing gsum/cutils.pyx
/home/bhbi3159/anaconda3/lib/python3.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-req-build-x3ppkehx/gsum/cutils.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
Error compiling Cython file:
------------------------------------------------------------
...
cimport cython
from cython_gsl cimport *
^
------------------------------------------------------------
gsum/cutils.pyx:2:0: 'cython_gsl.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
cimport numpy as np
cdef extern from "gsl/gsl_linalg.h":
# Pivoted Cholesky Decomposition
int gsl_linalg_pcholesky_decomp(gsl_matrix * A, gsl_permutation * P) nogil
^
------------------------------------------------------------
gsum/cutils.pyx:9:37: 'gsl_matrix' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
cimport numpy as np
cdef extern from "gsl/gsl_linalg.h":
# Pivoted Cholesky Decomposition
int gsl_linalg_pcholesky_decomp(gsl_matrix * A, gsl_permutation * P) nogil
^
------------------------------------------------------------
gsum/cutils.pyx:9:53: 'gsl_permutation' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
# Pivoted Cholesky Decomposition
int gsl_linalg_pcholesky_decomp(gsl_matrix * A, gsl_permutation * P) nogil
cdef extern from "gsl/gsl_permutation.h":
int gsl_permute_matrix (const gsl_permutation * p, gsl_matrix * A)
^
------------------------------------------------------------
gsum/cutils.pyx:13:34: 'gsl_permutation' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
# Pivoted Cholesky Decomposition
int gsl_linalg_pcholesky_decomp(gsl_matrix * A, gsl_permutation * P) nogil
cdef extern from "gsl/gsl_permutation.h":
int gsl_permute_matrix (const gsl_permutation * p, gsl_matrix * A)
^
------------------------------------------------------------
gsum/cutils.pyx:13:55: 'gsl_matrix' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
if not arr.flags['C_CONTIGUOUS']:
arr = np.ascontiguousarray(arr) # Makes a contiguous copy of the numpy array.
n = arr.shape[0]
cdef double[::1] aa = arr.ravel().copy()
cdef double[::1] ii = np.eye(n).ravel()
cdef gsl_permutation *P
^
------------------------------------------------------------
gsum/cutils.pyx:35:9: 'gsl_permutation' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
n = arr.shape[0]
cdef double[::1] aa = arr.ravel().copy()
cdef double[::1] ii = np.eye(n).ravel()
cdef gsl_permutation *P
# GSL wants its special gsl matrices
P = gsl_permutation_alloc(n)
^
------------------------------------------------------------
gsum/cutils.pyx:37:8: undeclared name not builtin: gsl_permutation_alloc
Error compiling Cython file:
------------------------------------------------------------
...
cdef double[::1] aa = arr.ravel().copy()
cdef double[::1] ii = np.eye(n).ravel()
cdef gsl_permutation *P
# GSL wants its special gsl matrices
P = gsl_permutation_alloc(n)
A = gsl_matrix_view_array(&aa[0], n, n)
^
------------------------------------------------------------
gsum/cutils.pyx:38:8: undeclared name not builtin: gsl_matrix_view_array
Error compiling Cython file:
------------------------------------------------------------
...
cdef double[::1] aa = arr.ravel().copy()
cdef double[::1] ii = np.eye(n).ravel()
cdef gsl_permutation *P
# GSL wants its special gsl matrices
P = gsl_permutation_alloc(n)
A = gsl_matrix_view_array(&aa[0], n, n)
^
------------------------------------------------------------
gsum/cutils.pyx:38:30: Cannot convert 'double *' to Python object
Error compiling Cython file:
------------------------------------------------------------
...
cdef double[::1] ii = np.eye(n).ravel()
cdef gsl_permutation *P
# GSL wants its special gsl matrices
P = gsl_permutation_alloc(n)
A = gsl_matrix_view_array(&aa[0], n, n)
I = gsl_matrix_view_array(&ii[0], n, n)
^
------------------------------------------------------------
gsum/cutils.pyx:39:30: Cannot convert 'double *' to Python object
Error compiling Cython file:
------------------------------------------------------------
...
A = gsl_matrix_view_array(&aa[0], n, n)
I = gsl_matrix_view_array(&ii[0], n, n)
# This constructs LDL^T where L is lower triangular with ones on the diagonal
# Turns aa into a matrix with L on the lower triangle, D on the diagonal, and ones on the upper triangle
gsl_linalg_pcholesky_decomp(&A.matrix, P)
^
------------------------------------------------------------
gsum/cutils.pyx:43:32: Cannot take address of Python object attribute 'matrix'
Error compiling Cython file:
------------------------------------------------------------
...
chol[range(n), range(n)] = 1.
# Multiply column i by d_i
chol *= d
# P is some permutation object but I want a matrix
gsl_permute_matrix(P, &I.matrix) # Permute the identity to turn ii into a permutation matrix
^
------------------------------------------------------------
gsum/cutils.pyx:53:26: Cannot take address of Python object attribute 'matrix'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-req-build-x3ppkehx/setup.py", line 24, in <module>
ext_modules = cythonize([Extension("gsum.cutils", ["gsum/cutils.pyx"])])
File "/home/bhbi3159/anaconda3/lib/python3.7/site-packages/Cython/Build/Dependencies.py", line 1101, in cythonize
cythonize_one(*args)
File "/home/bhbi3159/anaconda3/lib/python3.7/site-packages/Cython/Build/Dependencies.py", line 1224, in cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: gsum/cutils.pyx
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
WARNING: Keyring is skipped due to an exception: Failed to create the collection: Prompt dismissed..
WARNING: Keyring is skipped due to an exception: Failed to create the collection: Prompt dismissed..