Re: [Spglib-users] import spglib error in python2.7
Brought to you by:
atztogo
|
From: Atsushi T. <atz...@gm...> - 2020-08-07 00:28:41
|
Hi,
I tested and it was OK.
What I did is on Ubuntu 18.04.4 LTS (GNU/Linux 4.15.0-106-generic x86_64),
% conda create -n spglib-test -c conda-forge python=2.7
% pip install spglib
Togo
On Fri, Aug 7, 2020 at 4:54 AM xxliu <xx...@ph...> wrote:
>
> Dear all,
>
> I try to use the newest version 1.16 now.
> When I run python setup.py install --user
> With python3.6 it can run successfully.
> But with python2.7 there is an error:
>
>
> 7
> -I/home/fkp/xxliu/anaconda2/lib/python2.7/site-packages/numpy/core/include
> -c ../src/spin.c -o build/temp.linux-x86_64-2.7/../src/spin.o
> ../src/spin.c: In function ‘spn_get_operations_with_site_tensors’:
> ../src/spin.c:207:8: warning: ‘is_found’ may be used uninitialized in
> this function [-Wmaybe-uninitialized]
> if (is_found) {
> ^
> ../src/spin.c:158:31: note: ‘is_found’ was declared here
> int i, j, k, sign, num_sym, is_found;
> ^~~~~~~~
> gcc -pthread -B /home/fkp/xxliu/anaconda2/compiler_compat
> -Wl,--sysroot=/ -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3
> -Wall -Wstrict-prototypes -fPIC -I../src
> -I/home/fkp/xxliu/anaconda2/include/python2.7
> -I/home/fkp/xxliu/anaconda2/lib/python2.7/site-packages/numpy/core/include
> -c ../src/spg_database.c -o
> build/temp.linux-x86_64-2.7/../src/spg_database.o
> gcc -pthread -B /home/fkp/xxliu/anaconda2/compiler_compat
> -Wl,--sysroot=/ -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3
> -Wall -Wstrict-prototypes -fPIC -I../src
> -I/home/fkp/xxliu/anaconda2/include/python2.7
> -I/home/fkp/xxliu/anaconda2/lib/python2.7/site-packages/numpy/core/include
> -c ../src/spglib.c -o build/temp.linux-x86_64-2.7/../src/spglib.o
> gcc -pthread -B /home/fkp/xxliu/anaconda2/compiler_compat
> -Wl,--sysroot=/ -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3
> -Wall -Wstrict-prototypes -fPIC -I../src
> -I/home/fkp/xxliu/anaconda2/include/python2.7
> -I/home/fkp/xxliu/anaconda2/lib/python2.7/site-packages/numpy/core/include
> -c ../src/symmetry.c -o build/temp.linux-x86_64-2.7/../src/symmetry.o
> gcc -pthread -shared -B /home/fkp/xxliu/anaconda2/compiler_compat
> -L/home/fkp/xxliu/anaconda2/lib -Wl,-rpath=/home/fkp/xxliu/anaconda2/lib
> -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-2.7/_spglib.o
> build/temp.linux-x86_64-2.7/../src/arithmetic.o
> build/temp.linux-x86_64-2.7/../src/cell.o
> build/temp.linux-x86_64-2.7/../src/delaunay.o
> build/temp.linux-x86_64-2.7/../src/debug.o
> build/temp.linux-x86_64-2.7/../src/determination.o
> build/temp.linux-x86_64-2.7/../src/hall_symbol.o
> build/temp.linux-x86_64-2.7/../src/kgrid.o
> build/temp.linux-x86_64-2.7/../src/kpoint.o
> build/temp.linux-x86_64-2.7/../src/mathfunc.o
> build/temp.linux-x86_64-2.7/../src/niggli.o
> build/temp.linux-x86_64-2.7/../src/overlap.o
> build/temp.linux-x86_64-2.7/../src/pointgroup.o
> build/temp.linux-x86_64-2.7/../src/primitive.o
> build/temp.linux-x86_64-2.7/../src/refinement.o
> build/temp.linux-x86_64-2.7/../src/sitesym_database.o
> build/temp.linux-x86_64-2.7/../src/site_symmetry.o
> build/temp.linux-x86_64-2.7/../src/spacegroup.o
> build/temp.linux-x86_64-2.7/../src/spin.o
> build/temp.linux-x86_64-2.7/../src/spg_database.o
> build/temp.linux-x86_64-2.7/../src/spglib.o
> build/temp.linux-x86_64-2.7/../src/symmetry.o
> -L/home/fkp/xxliu/anaconda2/lib -lpython2.7 -o
> build/lib.linux-x86_64-2.7/spglib/_spglib.so
> /home/fkp/xxliu/anaconda2/compiler_compat/ld:
> build/temp.linux-x86_64-2.7/_spglib.o: unable to initialize decompress
> status for section .debug_info
> /home/fkp/xxliu/anaconda2/compiler_compat/ld:
> build/temp.linux-x86_64-2.7/_spglib.o: unable to initialize decompress
> status for section .debug_info
> /home/fkp/xxliu/anaconda2/compiler_compat/ld:
> build/temp.linux-x86_64-2.7/_spglib.o: unable to initialize decompress
> status for section .debug_info
> /home/fkp/xxliu/anaconda2/compiler_compat/ld:
> build/temp.linux-x86_64-2.7/_spglib.o: unable to initialize decompress
> status for section .debug_info
> build/temp.linux-x86_64-2.7/_spglib.o: file not recognized: file format
> not recognized
> collect2: error: ld returned 1 exit status
> error: command 'gcc' failed with exit status 1
>
> Can it run under python2.7?
>
> Best,
> Xiaoxiong
>
>
> _______________________________________________
> Spglib-users mailing list
> Spg...@li...
> https://lists.sourceforge.net/lists/listinfo/spglib-users
--
Atsushi Togo
|