<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">It looks like the error is pointing to
"<font color="#ff0000">with</font> 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:<br>
<br>
with open(filename, 'w') as f:<br>
^<br>
SyntaxError: invalid syntax<br>
<br>
As you already know, python versions older than about 2.5 do not
understand the "with" statement [
<a class="moz-txt-link-freetext" href="https://sourceforge.net/p/phonopy/mailman/message/32951207/">https://sourceforge.net/p/phonopy/mailman/message/32951207/</a> ] and
python 2.6 or newer needs to be used according to the phonopy
1.10.4 version of the install documentation [
<a class="moz-txt-link-freetext" href="http://atztogo.github.io/phonopy/install.html">http://atztogo.github.io/phonopy/install.html</a> ].<br>
<br>
In a terminal, try running the following command [
<a class="moz-txt-link-freetext" href="http://stackoverflow.com/questions/1093322/how-do-i-check-what-version-of-python-is-running-my-script">http://stackoverflow.com/questions/1093322/how-do-i-check-what-version-of-python-is-running-my-script</a>
] and check that the python version that is being used for
setup.py is version 2.6 or newer:<br>
<br>
python -V<br>
<br>
I downloaded xenial-desktop-amd64.iso (from [
<a class="moz-txt-link-freetext" href="http://cdimage.ubuntu.com/daily-live/current/">http://cdimage.ubuntu.com/daily-live/current/</a> ]) 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.<br>
<br>
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:<br>
<br>
ubuntu@ubuntu:~$ tar xvfz phono3py-1.10.5.tar.gz <br>
...<br>
ubuntu@ubuntu:~$ cd phono3py-1.10.5/<br>
<a class="moz-txt-link-abbreviated" href="mailto:ubuntu@ubuntu:~/phono3py-1.10.5$">ubuntu@ubuntu:~/phono3py-1.10.5$</a> python3 -V<br>
Python 3.5.1+<br>
<a class="moz-txt-link-abbreviated" href="mailto:ubuntu@ubuntu:~/phono3py-1.10.5$">ubuntu@ubuntu:~/phono3py-1.10.5$</a> touch __nanoversion__.txt<br>
<a class="moz-txt-link-abbreviated" href="mailto:ubuntu@ubuntu:~/phono3py-1.10.5$">ubuntu@ubuntu:~/phono3py-1.10.5$</a> python3 setup.py install
--home=/home/ubuntu/phono3py-1.10.5/<br>
...<br>
<a class="moz-txt-link-abbreviated" href="mailto:ubuntu@ubuntu:~/phono3py-1.10.5$">ubuntu@ubuntu:~/phono3py-1.10.5$</a> gedit ~/.bashrc<br>
export PYTHONPATH=$PYTHONPATH:~/phono3py-1.10.5/lib/python<br>
export PATH=$PATH:~/phono3py-1.10.5/bin<br>
<a class="moz-txt-link-abbreviated" href="mailto:ubuntu@ubuntu:~/phono3py-1.10.5$">ubuntu@ubuntu:~/phono3py-1.10.5$</a> source ~/.bashrc<br>
<a class="moz-txt-link-abbreviated" href="mailto:ubuntu@ubuntu:~/phono3py-1.10.5$">ubuntu@ubuntu:~/phono3py-1.10.5$</a> cd example/NaCl-wien2k<br>
<a class="moz-txt-link-abbreviated" href="mailto:ubuntu@ubuntu:~/phono3py-1.10.5/example/NaCl-wien2k$">ubuntu@ubuntu:~/phono3py-1.10.5/example/NaCl-wien2k$</a> phonopy
--wien2k -c NaCl.struct -d --dim="2 2 2"<br>
_ <br>
_ __ | |__ ___ _ __ ___ _ __ _ _ <br>
| '_ \| '_ \ / _ \| '_ \ / _ \ | '_ \| | | |<br>
| |_) | | | | (_) | | | | (_) || |_) | |_| |<br>
| .__/|_| |_|\___/|_| |_|\___(_) .__/ \__, |<br>
|_| |_| |___/<br>
1.10.5<br>
<br>
Python version 3.5.1<br>
Spglib version 1.9.0<br>
Creating displacements<br>
Settings:<br>
Supercell: [2 2 2]<br>
Spacegroup: Fm-3m (225)<br>
Number of non-equivalent atoms in NaCl.structS-001: 24<br>
Number of non-equivalent atoms in NaCl.structS-002: 24<br>
<br>
disp.yaml and supercells have been created.<br>
_ <br>
___ _ __ __| |<br>
/ _ \ '_ \ / _` |<br>
| __/ | | | (_| |<br>
\___|_| |_|\__,_|<br>
<br>
On 3/30/2016 4:45 AM, Rajneesh Chaurasiya wrote:<br>
</div>
<blockquote
cite="mid:CAOsEhO9yq51BjEX2tMCMG8boV_BN83O3rLt3_ZcenaZvFN6rvw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>Dear Gavin.<br>
<br>
</div>
as per your suggestion when i try to install the
phonopy-1.10.5 the error looks like <br>
<br>
File "setup.py", line 88<br>
with open("phonopy/version.py") as w:<br>
^<br>
SyntaxError: invalid syntax<br>
<br>
</div>
by giving the command line <br>
[ambeshst@IITJ_HPC phono3py-1.10.5]$ python setup.py install<br>
</div>
</blockquote>
</body>
</html>