[Wien] scf2forces
Gavin Abo
gsabo at crimson.ua.edu
Sat Apr 2 02:33:21 CEST 2016
It looks like the error is pointing to "with open". It seems like you
might be having the same problem as before. In other words, the same as
when you were trying to install version 1.10.0 of phonopy with python
2.4 and got a similar error in line 224 of thermal_properties.py:
with open(filename, 'w') as f:
^
SyntaxError: invalid syntax
As you already know, python versions older than about 2.5 do not
understand the "with" statement [
https://sourceforge.net/p/phonopy/mailman/message/32951207/ ] and python
2.6 or newer needs to be used according to the phonopy 1.10.4 version of
the install documentation [ http://atztogo.github.io/phonopy/install.html ].
In a terminal, try running the following command [
http://stackoverflow.com/questions/1093322/how-do-i-check-what-version-of-python-is-running-my-script
] and check that the python version that is being used for setup.py is
version 2.6 or newer:
python -V
I downloaded xenial-desktop-amd64.iso (from [
http://cdimage.ubuntu.com/daily-live/current/ ]) and used it to install
Ubuntu 16.04 on a USB stick. Ubuntu 16.04 is currently an experimental
or developmental version for Linux developers, such that Linux experts
usually tell users not to use it (and instead to use the Long Term
Support release, which is currently Ubuntu 14.04 LTS). However, Ubuntu
14.04 LTS is packaged with a python 2.7 or python 3.4 and not python
3.5, while Ubuntu 16.04 is packaged with python 3.5.
I used Ubuntu 16.04 to try to reproduce the error with python 3.5, but I
wasn't able to reproduce the error and it seemed to run fine:
ubuntu at ubuntu:~$ tar xvfz phono3py-1.10.5.tar.gz
...
ubuntu at ubuntu:~$ cd phono3py-1.10.5/
ubuntu at ubuntu:~/phono3py-1.10.5$ python3 -V
Python 3.5.1+
ubuntu at ubuntu:~/phono3py-1.10.5$ touch __nanoversion__.txt
ubuntu at ubuntu:~/phono3py-1.10.5$ python3 setup.py install
--home=/home/ubuntu/phono3py-1.10.5/
...
ubuntu at ubuntu:~/phono3py-1.10.5$ gedit ~/.bashrc
export PYTHONPATH=$PYTHONPATH:~/phono3py-1.10.5/lib/python
export PATH=$PATH:~/phono3py-1.10.5/bin
ubuntu at ubuntu:~/phono3py-1.10.5$ source ~/.bashrc
ubuntu at ubuntu:~/phono3py-1.10.5$ cd example/NaCl-wien2k
ubuntu at ubuntu:~/phono3py-1.10.5/example/NaCl-wien2k$ phonopy --wien2k -c
NaCl.struct -d --dim="2 2 2"
_
_ __ | |__ ___ _ __ ___ _ __ _ _
| '_ \| '_ \ / _ \| '_ \ / _ \ | '_ \| | | |
| |_) | | | | (_) | | | | (_) || |_) | |_| |
| .__/|_| |_|\___/|_| |_|\___(_) .__/ \__, |
|_| |_| |___/
1.10.5
Python version 3.5.1
Spglib version 1.9.0
Creating displacements
Settings:
Supercell: [2 2 2]
Spacegroup: Fm-3m (225)
Number of non-equivalent atoms in NaCl.structS-001: 24
Number of non-equivalent atoms in NaCl.structS-002: 24
disp.yaml and supercells have been created.
_
___ _ __ __| |
/ _ \ '_ \ / _` |
| __/ | | | (_| |
\___|_| |_|\__,_|
On 3/30/2016 4:45 AM, Rajneesh Chaurasiya wrote:
> Dear Gavin.
>
> as per your suggestion when i try to install the phonopy-1.10.5 the
> error looks like
>
> File "setup.py", line 88
> with open("phonopy/version.py") as w:
> ^
> SyntaxError: invalid syntax
>
> by giving the command line
> [ambeshst at IITJ_HPC phono3py-1.10.5]$ python setup.py install
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://zeus.theochem.tuwien.ac.at/pipermail/wien/attachments/20160401/d3fb6b94/attachment.html>
More information about the Wien
mailing list