请问为什么安装bandmat报这个错,我已经把gcc降了
15755841658 opened this issue · 4 comments
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/
I got the same problem. Have you figure out?
Hey try with python 3.6
I installed it successfully in python 3.7;
Try:
git clone git://github.com/MattShannon/bandmat.git
sudo apt-get install cython3 python3-numpy python3-scipy
sudo pip install -r requirements.txt
python setup.py build_ext --inplace
python setup.py install
@sfl666 非常感谢你的帮助
@ibagayoko 按照这个就可以了
我在python 3.7中成功安装了它;
尝试:
git clone git://github.com/MattShannon/bandmat.git
sudo apt-get install cython3 python3-numpy python3-scipy
sudo pip install -r requirements.txt
python setup.py build_ext --inplace
python setup.py install