Re: [f2py] crackfortran.py

Pearu Peterson <[email protected]> Tue, 5 Mar 2013 17:19:01 +0200
Newsgroups gmane.comp.python.f2py.user
Message-ID <CAPpwKczDBJ4N1CgPdT3LCHqgNFZUYFOhMNSUqA22Vg5qEtyc+w@mail.gmail.com>
--===============5800227215086572414==
Content-Type: multipart/alternative; boundary=f46d0438914b4c134904d72efe6c

--f46d0438914b4c134904d72efe6c
Content-Type: text/plain; charset=ISO-8859-1

On Tue, Mar 5, 2013 at 4:10 PM, Gergely Buday <[email protected]> wrote:

> Hi there,
>
> I am trying to compile an amateur radio program that uses f2py. I get
> the following error message:
>
> Traceback (most recent call last):
>   File "/usr/local/bin/f2py", line 3, in <module>
>     import f2py2e
>   File "/usr/local/lib/python2.7/dist-packages/f2py2e/__init__.py",
> line 10, in <module>
>     import f2py2e
>   File "/usr/local/lib/python2.7/dist-packages/f2py2e/f2py2e.py", line
> 26, in <module>
>     import crackfortran
>   File "/usr/local/lib/python2.7/dist-packages/f2py2e/crackfortran.py",
> line 1586
>     as=b['args']
>      ^
>
> Googling a bit I have found that the problem is that 'as' is a
> reserved keyword in later Python versions so it is not allowed to use
> it as a variable name. What can I do to fix this? My Python version is
> Python 2.7.3 and I use Ubuntu 12.04. I tried the built-in python-numpy
> and tha latest tgz from the f2py site as well.
>
> Or, is this a known problem and there is a known fix?
>

Yes, uninstall f2py2e (including f2py script) and reinstall numpy.
Pearu

--f46d0438914b4c134904d72efe6c
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><br><div class=3D"gmail=
_quote">On Tue, Mar 5, 2013 at 4:10 PM, Gergely Buday <span dir=3D"ltr">&lt=
;<a href=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>=
&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">Hi there,<br>
<br>
I am trying to compile an amateur radio program that uses f2py. I get<br>
the following error message:<br>
<br>
Traceback (most recent call last):<br>
=A0 File &quot;/usr/local/bin/f2py&quot;, line 3, in &lt;module&gt;<br>
=A0 =A0 import f2py2e<br>
=A0 File &quot;/usr/local/lib/python2.7/dist-packages/f2py2e/__init__.py&qu=
ot;,<br>
line 10, in &lt;module&gt;<br>
=A0 =A0 import f2py2e<br>
=A0 File &quot;/usr/local/lib/python2.7/dist-packages/f2py2e/f2py2e.py&quot=
;, line<br>
26, in &lt;module&gt;<br>
=A0 =A0 import crackfortran<br>
=A0 File &quot;/usr/local/lib/python2.7/dist-packages/f2py2e/crackfortran.p=
y&quot;,<br>
line 1586<br>
=A0 =A0 as=3Db[&#39;args&#39;]<br>
=A0 =A0 =A0^<br>
<br>
Googling a bit I have found that the problem is that &#39;as&#39; is a<br>
reserved keyword in later Python versions so it is not allowed to use<br>
it as a variable name. What can I do to fix this? My Python version is<br>
Python 2.7.3 and I use Ubuntu 12.04. I tried the built-in python-numpy<br>
and tha latest tgz from the f2py site as well.<br>
<br>
Or, is this a known problem and there is a known fix?<br></blockquote><div>=
<br></div><div>Yes, uninstall f2py2e (including f2py script) and reinstall =
numpy.<br></div><div>Pearu<br></div><div>=A0</div></div></div></div>

--f46d0438914b4c134904d72efe6c--


--===============5800227215086572414==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
f2py-users mailing list
f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]
http://cens.ioc.ee/mailman/listinfo/f2py-users

--===============5800227215086572414==--