Giter Site home page Giter Site logo

bandmat's People

Contributors

mattshannon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bandmat's Issues

Complex matrices support

Hi,
It appears that complex matrices are not supported. When I do the sum of two banded complex matrices, I get

Buffer dtype mismatch, expected 'float64_t' but got 'complex double'

Here is an example for this problem.

import bandmat as bm
import numpy as np

A = np.zeros((3,4), dtype='complex')
B = np.zeros((3,4), dtype='complex')
Abm = bm.BandMat(1,1, A)
Bbm = bm.BandMat(1,1, B)
Abm+Bbm

'-Wno-unused-but-set-variable' causes error during install

Hi.

I'm currently using Windows 10 with VS2017.
While installing bandmat via pip, '-Wno-unused-but-set-variable' is not recognized by the compiler, causing error during the installation.

Commenting out the part in setup.py seems to alleviate the issue. (though with many warnings)

setup fail

It appears that I can't install it with neither pip or setup.py method.So Here comes my case:
I'm using a OS X 10.11.6 System with python 2.7 installed,In case of some side effects I choose to install it within the virtulenv environment.
The error:
bandmat/full.c:237:10: fatal error: 'numpy/arrayobject.h' file not found
#include "numpy/arrayobject.h"
I've got some ideas about that the problem comes up because it can not locate the 'numpy/arrayobject.h' which actually exist at '/include/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h'

test_solve is failing on current Debian testing (buster)

Hi,
I just tried to install bandmat on a current updates Debian testing (buster, as of Nov 15, 2017) with the following commands:

sudo apt-get install python-numpy python-scipy

followed by

virtualenv --system-site-packages env
env/bin/pip install bandmat

which produced

Running virtualenv with interpreter /usr/bin/python2
New python executable in /pathtotheworkingdirectory/env/bin/python2
Also creating executable in /pathtotheworkingdirectory/env/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.
myusername@odino:/pathtotheworkingdirectory$ env/bin/pip install bandmat
Collecting bandmat
Requirement already satisfied: scipy>=0.9.0 in /usr/lib/python2.7/dist-packages (from bandmat)
Requirement already satisfied: numpy>=1.6.1 in /usr/lib/python2.7/dist-packages (from bandmat)
Installing collected packages: bandmat
Successfully installed bandmat-0.6

then I tried

LC_ALL=C env/bin/python -m unittest discover bandmat

but it is failing with

...........................................................................E..
======================================================================
ERROR: test_solve (bandmat.test_linalg.TestLinAlg)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/pathtotheworkingdirectory/env/local/lib/python2.7/site-packages/bandmat/test_linalg.py", line
    x = bla.solve(a_bm, b)
  File "bandmat/linalg.pyx", line 282, in bandmat.linalg.solve (bandmat/linalg.c:4264)
  File "/usr/lib/python2.7/dist-packages/scipy/linalg/basic.py", line 367, in solve_banded
    b2 /= a1[1, 0]
IndexError: index 1 is out of bounds for axis 0 with size 1

----------------------------------------------------------------------
Ran 78 tests in 0.585s

FAILED (errors=1)

the output is not stable, sometimes I get this other error instead

.........................................................................../usr/lib/python2.7/dist-packages/scipy/linalg/basic.py:367: RuntimeWarning: divide by zero encountered in true_divide
  b2 /= a1[1, 0]
F..
======================================================================
FAIL: test_solve (bandmat.test_linalg.TestLinAlg)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/pathtotheworkingdirectory/env/local/lib/python2.7/site-packages/bandmat/test_linalg.py", line 279, in test_solve
    assert_allclose(bm.dot_mv(a_bm, x), b)
  File "/pathtotheworkingdirectory/env/local/lib/python2.7/site-packages/bandmat/testhelp.py", line 23, in assert_allclose
    rel_err, np.max(rel_err)))
AssertionError: items not almost equal
 ACTUAL:
array([ inf])
 DESIRED:
array([ 0.78333299])
 ABS ERR: array([ inf]) (max inf)
 REL ERR: array([ inf]) (max inf)

----------------------------------------------------------------------
Ran 78 tests in 0.572s

FAILED (failures=1)

Do you have any hint about how to fix the issue? Do you think it is a bug in bandmat or in its dependencies?

Issue with installation

Hi Matt,

I tried installing your module but it would not compile unless I removed the compiler argument '-Wno-unused-but-set-variable'. Thanks for writing this package, it's quite useful!

David Purschke

PhD Candidate,
U. of Alberta,
Dep. of Physics

pip install error for python 3.7

Hi
When I tried to install bandmat using pip install bandmat. There are errors like followings. I've already installed numpy scipy and cython(0.29). Python version is 3.7

bandmat/core.c: In function '__Pyx_ExceptionSave':
bandmat/core.c:15606:19: error: 'PyThreadState' has no member named 'exc_type'
*type = tstate->exc_type;
^
bandmat/core.c:15607:20: error: 'PyThreadState' has no member named 'exc_value'
*value = tstate->exc_value;
^
bandmat/core.c:15608:17: error: 'PyThreadState' has no member named 'exc_traceback'
*tb = tstate->exc_traceback;
^
bandmat/core.c: In function '__Pyx_ExceptionReset':
bandmat/core.c:15620:22: error: 'PyThreadState' has no member named 'exc_type'
tmp_type = tstate->exc_type;
^
bandmat/core.c:15621:23: error: 'PyThreadState' has no member named 'exc_value'
tmp_value = tstate->exc_value;
^
bandmat/core.c:15622:20: error: 'PyThreadState' has no member named 'exc_traceback'
tmp_tb = tstate->exc_traceback;
^
bandmat/core.c:15623:11: error: 'PyThreadState' has no member named 'exc_type'
tstate->exc_type = type;
^
bandmat/core.c:15624:11: error: 'PyThreadState' has no member named 'exc_value'
tstate->exc_value = value;
^
bandmat/core.c:15625:11: error: 'PyThreadState' has no member named 'exc_traceback'
tstate->exc_traceback = tb;
^
bandmat/core.c: In function '__Pyx_GetException':
bandmat/core.c:15668:22: error: 'PyThreadState' has no member named 'exc_type'
tmp_type = tstate->exc_type;
^
bandmat/core.c:15669:23: error: 'PyThreadState' has no member named 'exc_value'
tmp_value = tstate->exc_value;
^
bandmat/core.c:15670:20: error: 'PyThreadState' has no member named 'exc_traceback'
tmp_tb = tstate->exc_traceback;
^
bandmat/core.c:15671:11: error: 'PyThreadState' has no member named 'exc_type'
tstate->exc_type = local_type;
^
bandmat/core.c:15672:11: error: 'PyThreadState' has no member named 'exc_value'
tstate->exc_value = local_value;
^
bandmat/core.c:15673:11: error: 'PyThreadState' has no member named 'exc_traceback'
tstate->exc_traceback = local_tb;
^
error: command 'gcc' failed with exit status 1

请问为什么安装bandmat报这个错,我已经把gcc降了

pip install bandmat
Collecting bandmat
Using cached https://files.pythonhosted.org/packages/94/69/c94a1f690ce9dace7de87f9c95ce297e11e8d0c1314f0280027be2194d0b/bandmat-0.7.tar.gz
Requirement already satisfied: numpy>=1.6.1 in /home/wtx/anaconda3/lib/python3.7/site-packages (from bandmat) (1.15.4)
Requirement already satisfied: scipy>=0.9.0 in /home/wtx/anaconda3/lib/python3.7/site-packages (from bandmat) (1.1.0)
Building wheels for collected packages: bandmat
Building wheel for bandmat (setup.py) ... error
Complete output from command /home/wtx/anaconda3/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-sn89maai/bandmat/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/pip-wheel-ztuk29pc --python-tag cp37:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/bandmat
copying bandmat/testhelp.py -> build/lib.linux-x86_64-3.7/bandmat
copying bandmat/test_core.py -> build/lib.linux-x86_64-3.7/bandmat
copying bandmat/test_linalg.py -> build/lib.linux-x86_64-3.7/bandmat
copying bandmat/init.py -> build/lib.linux-x86_64-3.7/bandmat
copying bandmat/test_full.py -> build/lib.linux-x86_64-3.7/bandmat
copying bandmat/test_testhelp.py -> build/lib.linux-x86_64-3.7/bandmat
copying bandmat/test_overlap.py -> build/lib.linux-x86_64-3.7/bandmat
copying bandmat/test_tensor.py -> build/lib.linux-x86_64-3.7/bandmat
copying bandmat/test_misc.py -> build/lib.linux-x86_64-3.7/bandmat
running build_ext
building 'bandmat.full' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/bandmat
gcc -pthread -B /home/wtx/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/wtx/anaconda3/lib/python3.7/site-packages/numpy/core/include -I/home/wtx/anaconda3/include/python3.7m -c bandmat/full.c -o build/temp.linux-x86_64-3.7/bandmat/full.o -O3
In file included from /home/wtx/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1823:0,
from /home/wtx/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
from /home/wtx/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from bandmat/full.c:239:
/home/wtx/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by "
^
bandmat/full.c: In function ‘__pyx_pf_7bandmat_4full_band_c’:
bandmat/full.c:1499:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (__pyx_t_17 = __pyx_t_16; __pyx_t_17 < __pyx_t_13; __pyx_t_17+=1) {
^
bandmat/full.c: In function ‘__pyx_pf_7bandmat_4full_2band_e’:
bandmat/full.c:1853:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) {
^
bandmat/full.c:1863:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ((((__pyx_v_j + __pyx_v_i) < __pyx_v_size) != 0)) {
^
bandmat/full.c: In function ‘__pyx_pf_7bandmat_4full_4zero_extra_entries’:
bandmat/full.c:2131:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_2; __pyx_t_5+=1) {
^
bandmat/full.c:2182:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (__pyx_t_5 = __pyx_t_9; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
^
bandmat/full.c: In function ‘__pyx_pf_7bandmat_4full_10band_cTe’:
bandmat/full.c:3023:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
^
bandmat/full.c:3033:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ((((__pyx_v_j - __pyx_v_i) < __pyx_v_size) != 0)) {
^
gcc -pthread -shared -B /home/wtx/anaconda3/compiler_compat -L/home/wtx/anaconda3/lib -Wl,-rpath=/home/wtx/anaconda3/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.7/bandmat/full.o -o build/lib.linux-x86_64-3.7/bandmat/full.cpython-37m-x86_64-linux-gnu.so
building 'bandmat.core' extension
gcc -pthread -B /home/wtx/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/wtx/anaconda3/lib/python3.7/site-packages/numpy/core/include -I/home/wtx/anaconda3/include/python3.7m -c bandmat/core.c -o build/temp.linux-x86_64-3.7/bandmat/core.o -O3
In file included from /home/wtx/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1823:0,
from /home/wtx/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
from /home/wtx/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from bandmat/core.c:239:
/home/wtx/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by "
^
bandmat/core.c: In function ‘__pyx_pf_7bandmat_4core_7BandMat_16plus_equals_band_of’:
bandmat/core.c:4088:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (__pyx_t_15 = __pyx_t_14; __pyx_t_15 < __pyx_t_9; __pyx_t_15+=1) {
^
bandmat/core.c: In function ‘__Pyx_ExceptionSave’:
bandmat/core.c:15606:19: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
*type = tstate->exc_type;
^
bandmat/core.c:15607:20: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
*value = tstate->exc_value;
^
bandmat/core.c:15608:17: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
*tb = tstate->exc_traceback;
^
bandmat/core.c: In function ‘__Pyx_ExceptionReset’:
bandmat/core.c:15620:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tmp_type = tstate->exc_type;
^
bandmat/core.c:15621:23: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tmp_value = tstate->exc_value;
^
bandmat/core.c:15622:20: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tmp_tb = tstate->exc_traceback;
^
bandmat/core.c:15623:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tstate->exc_type = type;
^
bandmat/core.c:15624:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tstate->exc_value = value;
^
bandmat/core.c:15625:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tstate->exc_traceback = tb;
^
bandmat/core.c: In function ‘__Pyx_GetException’:
bandmat/core.c:15668:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tmp_type = tstate->exc_type;
^
bandmat/core.c:15669:23: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tmp_value = tstate->exc_value;
^
bandmat/core.c:15670:20: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tmp_tb = tstate->exc_traceback;
^
bandmat/core.c:15671:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tstate->exc_type = local_type;
^
bandmat/core.c:15672:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tstate->exc_value = local_value;
^
bandmat/core.c:15673:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tstate->exc_traceback = local_tb;
^
error: command 'gcc' failed with exit status 1


Failed building wheel for bandmat
Running setup.py clean for bandmat
Failed to build bandmat
Installing collected packages: bandmat
Running setup.py install for bandmat ... error
Complete output from command /home/wtx/anaconda3/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-sn89maai/bandmat/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-vl8uqakf/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/bandmat
copying bandmat/testhelp.py -> build/lib.linux-x86_64-3.7/bandmat
copying bandmat/test_core.py -> build/lib.linux-x86_64-3.7/bandmat
copying bandmat/test_linalg.py -> build/lib.linux-x86_64-3.7/bandmat
copying bandmat/init.py -> build/lib.linux-x86_64-3.7/bandmat
copying bandmat/test_full.py -> build/lib.linux-x86_64-3.7/bandmat
copying bandmat/test_testhelp.py -> build/lib.linux-x86_64-3.7/bandmat
copying bandmat/test_overlap.py -> build/lib.linux-x86_64-3.7/bandmat
copying bandmat/test_tensor.py -> build/lib.linux-x86_64-3.7/bandmat
copying bandmat/test_misc.py -> build/lib.linux-x86_64-3.7/bandmat
running build_ext
building 'bandmat.full' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/bandmat
gcc -pthread -B /home/wtx/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/wtx/anaconda3/lib/python3.7/site-packages/numpy/core/include -I/home/wtx/anaconda3/include/python3.7m -c bandmat/full.c -o build/temp.linux-x86_64-3.7/bandmat/full.o -O3
In file included from /home/wtx/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1823:0,
from /home/wtx/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
from /home/wtx/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from bandmat/full.c:239:
/home/wtx/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by "
^
bandmat/full.c: In function ‘__pyx_pf_7bandmat_4full_band_c’:
bandmat/full.c:1499:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (__pyx_t_17 = __pyx_t_16; __pyx_t_17 < __pyx_t_13; __pyx_t_17+=1) {
^
bandmat/full.c: In function ‘__pyx_pf_7bandmat_4full_2band_e’:
bandmat/full.c:1853:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) {
^
bandmat/full.c:1863:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ((((__pyx_v_j + __pyx_v_i) < __pyx_v_size) != 0)) {
^
bandmat/full.c: In function ‘__pyx_pf_7bandmat_4full_4zero_extra_entries’:
bandmat/full.c:2131:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_2; __pyx_t_5+=1) {
^
bandmat/full.c:2182:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (__pyx_t_5 = __pyx_t_9; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
^
bandmat/full.c: In function ‘__pyx_pf_7bandmat_4full_10band_cTe’:
bandmat/full.c:3023:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
^
bandmat/full.c:3033:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ((((__pyx_v_j - __pyx_v_i) < __pyx_v_size) != 0)) {
^
gcc -pthread -shared -B /home/wtx/anaconda3/compiler_compat -L/home/wtx/anaconda3/lib -Wl,-rpath=/home/wtx/anaconda3/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.7/bandmat/full.o -o build/lib.linux-x86_64-3.7/bandmat/full.cpython-37m-x86_64-linux-gnu.so
building 'bandmat.core' extension
gcc -pthread -B /home/wtx/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/wtx/anaconda3/lib/python3.7/site-packages/numpy/core/include -I/home/wtx/anaconda3/include/python3.7m -c bandmat/core.c -o build/temp.linux-x86_64-3.7/bandmat/core.o -O3
In file included from /home/wtx/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1823:0,
from /home/wtx/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
from /home/wtx/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from bandmat/core.c:239:
/home/wtx/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by "
^
bandmat/core.c: In function ‘__pyx_pf_7bandmat_4core_7BandMat_16plus_equals_band_of’:
bandmat/core.c:4088:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (__pyx_t_15 = __pyx_t_14; __pyx_t_15 < __pyx_t_9; __pyx_t_15+=1) {
^
bandmat/core.c: In function ‘__Pyx_ExceptionSave’:
bandmat/core.c:15606:19: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
*type = tstate->exc_type;
^
bandmat/core.c:15607:20: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
*value = tstate->exc_value;
^
bandmat/core.c:15608:17: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
*tb = tstate->exc_traceback;
^
bandmat/core.c: In function ‘__Pyx_ExceptionReset’:
bandmat/core.c:15620:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tmp_type = tstate->exc_type;
^
bandmat/core.c:15621:23: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tmp_value = tstate->exc_value;
^
bandmat/core.c:15622:20: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tmp_tb = tstate->exc_traceback;
^
bandmat/core.c:15623:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tstate->exc_type = type;
^
bandmat/core.c:15624:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tstate->exc_value = value;
^
bandmat/core.c:15625:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tstate->exc_traceback = tb;
^
bandmat/core.c: In function ‘__Pyx_GetException’:
bandmat/core.c:15668:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tmp_type = tstate->exc_type;
^
bandmat/core.c:15669:23: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tmp_value = tstate->exc_value;
^
bandmat/core.c:15670:20: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tmp_tb = tstate->exc_traceback;
^
bandmat/core.c:15671:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tstate->exc_type = local_type;
^
bandmat/core.c:15672:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tstate->exc_value = local_value;
^
bandmat/core.c:15673:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tstate->exc_traceback = local_tb;
^
error: command 'gcc' failed with exit status 1

----------------------------------------

Command "/home/wtx/anaconda3/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-sn89maai/bandmat/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-vl8uqakf/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-sn89maai/bandmat/

Unable to install bandmat

I have installed all the requirements to install bandmat also i have installed python3.6 version and everything works fine but when i use
pip install bandmat
i get this error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0s5d16v0/bandmat/setup.py'"'"'; file='"'"'/tmp/pip-install-0s5d16v0/bandmat/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-3v1f1rhm/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/hacker/.local/include/python3.6m/bandmat
cwd: /tmp/pip-install-0s5d16v0/bandmat/
Complete output (25 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/bandmat
copying bandmat/test_overlap.py -> build/lib.linux-x86_64-3.6/bandmat
copying bandmat/test_tensor.py -> build/lib.linux-x86_64-3.6/bandmat
copying bandmat/testhelp.py -> build/lib.linux-x86_64-3.6/bandmat
copying bandmat/init.py -> build/lib.linux-x86_64-3.6/bandmat
copying bandmat/test_full.py -> build/lib.linux-x86_64-3.6/bandmat
copying bandmat/test_misc.py -> build/lib.linux-x86_64-3.6/bandmat
copying bandmat/test_testhelp.py -> build/lib.linux-x86_64-3.6/bandmat
copying bandmat/test_core.py -> build/lib.linux-x86_64-3.6/bandmat
copying bandmat/test_linalg.py -> build/lib.linux-x86_64-3.6/bandmat
running build_ext
building 'bandmat.full' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/bandmat
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fdebug-prefix-map=/build/python3.6-t1GNlY/python3.6-3.6.14=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/hacker/.local/lib/python3.6/site-packages/numpy/core/include -I/usr/include/python3.6m -c bandmat/full.c -o build/temp.linux-x86_64-3.6/bandmat/full.o -O3
bandmat/full.c:8:10: fatal error: pyconfig.h: No such file or directory
8 | #include "pyconfig.h"
| ^~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0s5d16v0/bandmat/setup.py'"'"'; file='"'"'/tmp/pip-install-0s5d16v0/bandmat/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-3v1f1rhm/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/hacker/.local/include/python3.6m/bandmat Check the logs for full command output

what should i do to install this package

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.