[ase-users] The example of example_ase.py.
root
rootinformation at gmail.com
Mon Aug 1 20:51:58 CEST 2011
Hi,
I am trying to install spglib on win 7 and having the following errors:
Does anyone know if this is source code error or compiler error?
running install
running build
running build_py
creating build
creating build\lib.win32-2.7
creating build\lib.win32-2.7\pyspglib
copying pyspglib\spglib.py -> build\lib.win32-2.7\pyspglib
copying pyspglib\__init__.py -> build\lib.win32-2.7\pyspglib
running build_ext
No module named msvccompiler in numpy.distutils; trying from distutils
building 'pyspglib._spglib' extension
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
creating build\src
D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo
/Ox
/MD /W3 /GS- /DNDEBUG -I../../src
-ID:\Python27\lib\site-packages\numpy\core\inc
lude -ID:\Python27\include -ID:\Python27\PC /Tc_spglib.c
/Fobuild\temp.win32-2.7
\Release\_spglib.obj
Found executable D:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\BIN\cl.ex
e
_spglib.c
_spglib.c(53) : error C2143: syntax error : missing ';' before 'type'
_spglib.c(54) : error C2143: syntax error : missing ';' before 'type'
_spglib.c(55) : error C2143: syntax error : missing ';' before 'const'
_spglib.c(56) : error C2143: syntax error : missing ';' before 'const'
_spglib.c(58) : error C2143: syntax error : missing ';' before 'type'
_spglib.c(59) : error C2065: 'num_atom' : undeclared identifier
_spglib.c(60) : error C2065: 'typat' : undeclared identifier
_spglib.c(60) : error C2109: subscript requires array or pointer type
_spglib.c(60) : error C2065: 'typat_long' : undeclared identifier
_spglib.c(60) : error C2109: subscript requires array or pointer type
_spglib.c(63) : error C2065: 'lat' : undeclared identifier
_spglib.c(63) : warning C4047: 'function' : 'double (*)[3]' differs in
levels of
indirection from 'int'
_spglib.c(63) : warning C4024: 'spg_get_dataset' : different types for
formal an
d actual parameter 1
_spglib.c(63) : error C2065: 'pos' : undeclared identifier
_spglib.c(63) : warning C4047: 'function' : 'double (*)[3]' differs in
levels of
indirection from 'int'
_spglib.c(63) : warning C4024: 'spg_get_dataset' : different types for
formal an
d actual parameter 2
_spglib.c(63) : error C2065: 'typat' : undeclared identifier
_spglib.c(63) : warning C4047: 'function' : 'const int *' differs in levels
of i
ndirection from 'int'
_spglib.c(63) : warning C4024: 'spg_get_dataset' : different types for
formal an
d actual parameter 3
_spglib.c(63) : error C2065: 'num_atom' : undeclared identifier
_spglib.c(140) : error C2143: syntax error : missing ';' before 'type'
_spglib.c(141) : error C2143: syntax error : missing ';' before 'type'
_spglib.c(142) : error C2143: syntax error : missing ';' before 'const'
_spglib.c(143) : error C2143: syntax error : missing ';' before 'const'
_spglib.c(145) : error C2143: syntax error : missing ';' before 'type'
_spglib.c(146) : error C2065: 'num_atom' : undeclared identifier
_spglib.c(147) : error C2065: 'typat' : undeclared identifier
_spglib.c(147) : error C2109: subscript requires array or pointer type
_spglib.c(147) : error C2065: 'typat_long' : undeclared identifier
_spglib.c(147) : error C2109: subscript requires array or pointer type
_spglib.c(149) : error C2143: syntax error : missing ';' before 'const'
_spglib.c(155) : error C2065: 'num_spg' : undeclared identifier
_spglib.c(160) : error C2143: syntax error : missing '{' before '*'
_spglib.c(161) : error C2371: 'refine_cell' : redefinition; different basic
type
s
_spglib.c(8) : see declaration of 'refine_cell'
_spglib.c(171) : error C2143: syntax error : missing ';' before 'type'
_spglib.c(172) : error C2143: syntax error : missing ';' before 'type'
_spglib.c(173) : error C2143: syntax error : missing ';' before 'type'
_spglib.c(175) : error C2143: syntax error : missing ';' before 'type'
_spglib.c(177) : error C2065: 'typat' : undeclared identifier
_spglib.c(177) : error C2109: subscript requires array or pointer type
_spglib.c(177) : error C2065: 'typat_long' : undeclared identifier
_spglib.c(177) : error C2109: subscript requires array or pointer type
_spglib.c(180) : error C2143: syntax error : missing ';' before 'type'
_spglib.c(186) : error C2065: 'num_atom_brv' : undeclared identifier
_spglib.c(187) : error C2065: 'typat_long' : undeclared identifier
_spglib.c(187) : error C2109: subscript requires array or pointer type
_spglib.c(187) : error C2065: 'typat' : undeclared identifier
_spglib.c(187) : error C2109: subscript requires array or pointer type
_spglib.c(190) : error C2065: 'num_atom_brv' : undeclared identifier
_spglib.c(190) : warning C4133: 'return' : incompatible types - from
'PyObject *
' to 'int *'
_spglib.c(194) : error C2143: syntax error : missing '{' before '*'
_spglib.c(195) : error C2371: 'get_multiplicity' : redefinition; different
basic
types
_spglib.c(10) : see declaration of 'get_multiplicity'
_spglib.c(204) : error C2143: syntax error : missing ';' before 'type'
_spglib.c(205) : error C2143: syntax error : missing ';' before 'type'
_spglib.c(206) : error C2143: syntax error : missing ';' before 'const'
_spglib.c(207) : error C2143: syntax error : missing ';' before 'const'
_spglib.c(209) : error C2143: syntax error : missing ';' before 'type'
_spglib.c(210) : error C2065: 'num_atom' : undeclared identifier
_spglib.c(211) : error C2065: 'types' : undeclared identifier
_spglib.c(211) : error C2109: subscript requires array or pointer type
_spglib.c(211) : error C2065: 'types_long' : undeclared identifier
_spglib.c(211) : error C2109: subscript requires array or pointer type
_spglib.c(214) : error C2143: syntax error : missing ';' before 'const'
_spglib.c(220) : error C2065: 'num_sym' : undeclared identifier
_spglib.c(220) : warning C4133: 'return' : incompatible types - from
'PyObject *
' to 'int *'
_spglib.c(223) : error C2143: syntax error : missing '{' before '*'
_spglib.c(224) : error C2371: 'find_primitive' : redefinition; different
basic t
ypes
_spglib.c(11) : see declaration of 'find_primitive'
_spglib.c(233) : error C2143: syntax error : missing ';' before 'type'
_spglib.c(234) : error C2143: syntax error : missing ';' before 'type'
_spglib.c(235) : error C2143: syntax error : missing ';' before 'type'
_spglib.c(236) : error C2143: syntax error : missing ';' before 'type'
_spglib.c(238) : error C2143: syntax error : missing ';' before 'type'
_spglib.c(239) : error C2065: 'num_atom' : undeclared identifier
_spglib.c(240) : error C2065: 'types' : undeclared identifier
_spglib.c(240) : error C2109: subscript requires array or pointer type
_spglib.c(240) : error C2065: 'types_long' : undeclared identifier
_spglib.c(240) : error C2109: subscript requires array or pointer type
_spglib.c(243) : error C2143: syntax error : missing ';' before 'type'
_spglib.c(249) : error C2065: 'num_atom_prim' : undeclared identifier
_spglib.c(250) : error C2065: 'types_long' : undeclared identifier
_spglib.c(250) : error C2109: subscript requires array or pointer type
_spglib.c(250) : error C2065: 'types' : undeclared identifier
_spglib.c(250) : error C2109: subscript requires array or pointer type
_spglib.c(253) : error C2065: 'num_atom_prim' : undeclared identifier
_spglib.c(253) : warning C4133: 'return' : incompatible types - from
'PyObject *
' to 'int *'
_spglib.c(256) : error C2143: syntax error : missing '{' before '*'
_spglib.c(257) : error C2371: 'get_symmetry' : redefinition; different basic
typ
es
_spglib.c(9) : see declaration of 'get_symmetry'
_spglib.c(269) : error C2143: syntax error : missing ';' before 'type'
_spglib.c(270) : error C2143: syntax error : missing ';' before 'type'
_spglib.c(271) : error C2143: syntax error : missing ';' before 'const'
_spglib.c(272) : error C2143: syntax error : missing ';' before 'const'
_spglib.c(273) : error C2143: syntax error : missing ';' before 'type'
_spglib.c(274) : error C2143: syntax error : missing ';' before 'type'
_spglib.c(275) : error C2143: syntax error : missing ';' before 'const'
_spglib.c(277) : error C2143: syntax error : missing ';' before 'type'
_spglib.c(279) : error C2143: syntax error : missing ';' before 'type'
_spglib.c(280) : error C2065: 'num_atom' : undeclared identifier
_spglib.c(281) : error C2065: 'types' : undeclared identifier
_spglib.c(281) : error C2109: subscript requires array or pointer type
_spglib.c(281) : error C2065: 'types_long' : undeclared identifier
_spglib.c(281) : error C2109: subscript requires array or pointer type
_spglib.c(284) : error C2143: syntax error : missing ';' before 'const'
_spglib.c(292) : error C2065: 'num_sym' : undeclared identifier
_spglib.c(295) : error C2065: 'rot_long' : undeclared identifier
_spglib.c(295) : error C2109: subscript requires array or pointer type
_spglib.c(295) : error C2065: 'rot' : undeclared identifier
_spglib.c(295) : error C2109: subscript requires array or pointer type
_spglib.c(297) : error C2065: 'num_sym' : undeclared identifier
_spglib.c(297) : warning C4133: 'return' : incompatible types - from
'PyObject *
' to 'int *'
_spglib.c(300) : error C2143: syntax error : missing '{' before '*'
_spglib.c(301) : error C2371: 'get_ir_kpoints' : redefinition; different
basic t
ypes
_spglib.c(12) : see declaration of 'get_ir_kpoints'
_spglib.c(301) : fatal error C1003: error count exceeds 100; stopping
compilatio
n
---------------------------------------------------------------------------
SystemExit Traceback (most recent call last)
e:\mypythonfiles\spglib-1.0.7\python\ase\setup.py in <module>()
45 url = 'http://spglib.sourceforge.net/',
46 packages = ['pyspglib'],
---> 47 ext_modules = [extension])
48
49
D:\Python27\lib\distutils\core.pyc in setup(**attrs)
167 raise
168 else:
--> 169 raise SystemExit, "error: " + str(msg)
170
171 return dist
SystemExit: error: Command "D:\Program Files (x86)\Microsoft Visual Studio
9.0\V
C\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -I../../src
-ID:\Python27\lib\
site-packages\numpy\core\include -ID:\Python27\include -ID:\Python27\PC
/Tc_spgl
ib.c /Fobuild\temp.win32-2.7\Release\_spglib.obj" failed with exit status 2
WARNING: Failure executing file: <setup.py>
On Wed, Jul 20, 2011 at 5:36 AM, Kristen Kaasbjerg <kkaa at fysik.dtu.dk>wrote:
> You have to import spglib as
>
> from pyspglib import spglib
>
> Kristen
>
> ________________________________________
> Fra: ase-users-bounces at listserv.fysik.dtu.dk [
> ase-users-bounces at listserv.fysik.dtu.dk] På vegne af Hongyi Zhao [
> hongyi.zhao at gmail.com]
> Sendt: 20. juli 2011 10:58
> Til: ase-users at listserv.fysik.dtu.dk
> Emne: [ase-users] The example of example_ase.py.
>
> Dear All,
>
> I'm a new user of ASE. I've installed the ASE, spglib, and
> pyspglibForASE according to the guidelines on the official sites.
>
> When I run the example_ase.py shipped with pyspglibForASE, I meet the
> following errors:
>
> -----
> werner at debian:~/software/ASE_relative/spglib/python/ase$ python
> example_ase.py
> Traceback (most recent call last):
> File "example_ase.py", line 5, in <module>
> from pyspglib import spglib
> File
> "/home/werner/software/ASE_relative/spglib/python/ase/pyspglib/spglib.py",
> line 5, in <module>
> import pyspglib._spglib as spg
> ImportError: No module named _spglib
> ------
>
> Any hints will be highly appreciated.
>
> Regards
> --
> Hongyi Zhao <hongyi.zhao at gmail.com>
> Institute of Semiconductors, Chinese Academy of Sciences
> GnuPG DSA: 0xD108493
> _______________________________________________
> ase-users mailing list
> ase-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
> _______________________________________________
> ase-users mailing list
> ase-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20110801/82f41e7f/attachment.html>
More information about the ase-users
mailing list