473,322 Members | 1,718 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

f2py error - windows xp (F2PY-2.43.239_1806)

Hi,

after having installed F2PY-2.43.239_1806 I get the following error when
trying to run the hello.f example from the /docs directory:

f2py.py --fcompiler=compaqv -c -m hello hello.f
numpy_info:
FOUND:
define_macros = [('NUMERIC_VERSION', '"\\"23.1\\""')]
include_dirs = ['D:\\Python23\\include']

running build
running config_fc
running build_src
building extension "hello" sources
f2py:> d:\dokume~1\faust\lokale~1\temp\tmpypqgoi\src\hell omodule.c
creating d:\dokume~1\faust\lokale~1\temp\tmpypqgoi
creating d:\dokume~1\faust\lokale~1\temp\tmpypqgoi\src
Reading fortran codes...
Reading file 'hello.f'
Post-processing...
Block: hello
Block: foo
Post-processing (stage 2)...
Building modules...
Building module "hello"...
Constructing wrapper function "foo"...
foo(a)
Wrote C/API module "hello" to file
"d:\dokume~1\faust\lokale~1\temp\tmpypqgoi\src/hellomodule.c"
adding
'd:\dokume~1\faust\lokale~1\temp\tmpypqgoi\src\for tranobject.c' to sources.
adding 'd:\dokume~1\faust\lokale~1\temp\tmpypqgoi\src' to include_dirs.
copying D:\Python23\lib\site-packages\f2py2e\src\fortranobject.c ->
d:\dokume~1\faust\lokale~1\temp\tmpypqgoi\src
copying D:\Python23\lib\site-packages\f2py2e\src\fortranobject.h ->
d:\dokume~1\faust\lokale~1\temp\tmpypqgoi\src
running build_ext
No module named msvccompiler in scipy_distutils, trying from distutils..
customize MSVCCompiler
customize MSVCCompiler using build_ext
0
customize CompaqVisualFCompiler
customize CompaqVisualFCompiler using build_ext
building 'hello' extension
compling C sources
D:\Programme\Microsoft Visual Studio\VC98\BIN\cl.exe /c /nologo /Ox /MD
/W3 /GX /DNDEBUG -ID:\Python23\include -Id:\dokume~1\faust\l
okale~1\temp\tmpypqgoi\src -ID:\Python23\include -ID:\Python23\PC
/Tcd:\dokume~1\faust\lokale~1\temp\tmpypqgoi\src\he llomodule.c /Fo
d:\dokume~1\faust\lokale~1\temp\tmpypqgoi\src\hell omodule.obj
D:\Programme\Microsoft Visual Studio\VC98\BIN\cl.exe /c /nologo /Ox /MD
/W3 /GX /DNDEBUG -ID:\Python23\include -Id:\dokume~1\faust\l
okale~1\temp\tmpypqgoi\src -ID:\Python23\include -ID:\Python23\PC
/Tcd:\dokume~1\faust\lokale~1\temp\tmpypqgoi\src\fo rtranobject.c /
Fod:\dokume~1\faust\lokale~1\temp\tmpypqgoi\src\fo rtranobject.obj
fortranobject.c
d:\dokume~1\faust\lokale~1\temp\tmpypqgoi\src\fort ranobject.c(576) :
error C2039: 'weakreflist' : is not a member of 'PyArrayObject'

D:\Python23\include\Numeric/arrayobject.h(49) : see declaration
of 'PyArrayObject'
d:\dokume~1\faust\lokale~1\temp\tmpypqgoi\src\fort ranobject.c(576) :
error C2039: 'weakreflist' : is not a member of 'PyArrayObject'

D:\Python23\include\Numeric/arrayobject.h(49) : see declaration
of 'PyArrayObject'
d:\dokume~1\faust\lokale~1\temp\tmpypqgoi\src\fort ranobject.c(576) :
error C2039: 'weakreflist' : is not a member of 'PyArrayObject'

D:\Python23\include\Numeric/arrayobject.h(49) : see declaration
of 'PyArrayObject'
d:\dokume~1\faust\lokale~1\temp\tmpypqgoi\src\fort ranobject.c(576) :
error C2039: 'weakreflist' : is not a member of 'PyArrayObject'

D:\Python23\include\Numeric/arrayobject.h(49) : see declaration
of 'PyArrayObject'
error: Command ""D:\Programme\Microsoft Visual Studio\VC98\BIN\cl.exe"
/c /nologo /Ox /MD /W3 /GX /DNDEBUG -ID:\Python23\include -Id
:\dokume~1\faust\lokale~1\temp\tmpypqgoi\src -ID:\Python23\include
-ID:\Python23\PC /Tcd:\dokume~1\faust\lokale~1\temp\tmpypqgoi\src
\fortranobject.c
/Fod:\dokume~1\faust\lokale~1\temp\tmpypqgoi\src\fo rtranobject.obj"
failed with exit status 2

I'm on Windows XP with Python 2.3.4. Has anybody an idea what's going
wrong? Thanks in advance!

Markus

mailto: Markus.Faust at t-online.de
Jul 18 '05 #1
6 2189
"M. Faust" <ma*******@gmx.de> writes:
Hi,

after having installed F2PY-2.43.239_1806 I get the following error
when trying to run the hello.f example from the /docs directory:

f2py.py --fcompiler=compaqv -c -m hello hello.f .... error C2039: 'weakreflist' : is not a member of 'PyArrayObject' ....
I'm on Windows XP with Python 2.3.4. Has anybody an idea what's going
wrong? Thanks in advance!


It seems the latest f2py versions need NumPy 23.3 which íntroduces
'weakreflist' in the 'PyArrayObject' struct.

Regards
Berthold

--
bh***@web.de / http://starship.python.net/crew/bhoel/
Jul 18 '05 #2

I got the same error with NumPy 23.3.

Markus
Jul 18 '05 #3
M. Faust wrote:

I got the same error with NumPy 23.3.

Markus

numpy_info:
FOUND:
define_macros = [('NUMERIC_VERSION', '"\\"23.3\\""')]
include_dirs = ['D:\\Python23\\include']

running build
running config_fc
running build_src
building extension "hello" sources
f2py:> d:\dokume~1\faust\lokale~1\temp\tmp57wwzd\src\hell omodule.c
creating d:\dokume~1\faust\lokale~1\temp\tmp57wwzd
creating d:\dokume~1\faust\lokale~1\temp\tmp57wwzd\src
Reading fortran codes...
Reading file 'hello.f'
Post-processing...
Block: hello
Block: foo
Post-processing (stage 2)...
Building modules...
Building module "hello"...
Constructing wrapper function "foo"...
foo(a)
Wrote C/API module "hello" to file
"d:\dokume~1\faust\lokale~1\temp\tmp57wwzd\src/hellomodule.c"
adding
'd:\dokume~1\faust\lokale~1\temp\tmp57wwzd\src\for tranobject.c' to sources.
adding 'd:\dokume~1\faust\lokale~1\temp\tmp57wwzd\src' to include_dirs.
copying D:\Python23\lib\site-packages\f2py2e\src\fortranobject.c ->
d:\dokume~1\faust\lokale~1\temp\tmp57wwzd\src
copying D:\Python23\lib\site-packages\f2py2e\src\fortranobject.h ->
d:\dokume~1\faust\lokale~1\temp\tmp57wwzd\src
running build_ext
No module named msvccompiler in scipy_distutils, trying from distutils..
customize MSVCCompiler
customize MSVCCompiler using build_ext
0
customize CompaqVisualFCompiler
customize CompaqVisualFCompiler using build_ext
building 'hello' extension
compling C sources
D:\Programme\Microsoft Visual Studio\VC98\BIN\cl.exe /c /nologo /Ox /MD
/W3 /GX /DNDEBUG -ID:\Python23\include -Id:\dokume~1\faust\l
okale~1\temp\tmp57wwzd\src -ID:\Python23\include -ID:\Python23\PC
/Tcd:\dokume~1\faust\lokale~1\temp\tmp57wwzd\src\fo rtranobject.c /
Fod:\dokume~1\faust\lokale~1\temp\tmp57wwzd\src\fo rtranobject.obj
fortranobject.c
d:\dokume~1\faust\lokale~1\temp\tmp57wwzd\src\fort ranobject.c(576) :
error C2039: 'weakreflist' : is not a member of 'PyArrayObject'

D:\Python23\include\Numeric/arrayobject.h(49) : see declaration
of 'PyArrayObject'
d:\dokume~1\faust\lokale~1\temp\tmp57wwzd\src\fort ranobject.c(576) :
error C2039: 'weakreflist' : is not a member of 'PyArrayObject'

D:\Python23\include\Numeric/arrayobject.h(49) : see declaration
of 'PyArrayObject'
d:\dokume~1\faust\lokale~1\temp\tmp57wwzd\src\fort ranobject.c(576) :
error C2039: 'weakreflist' : is not a member of 'PyArrayObject'

D:\Python23\include\Numeric/arrayobject.h(49) : see declaration
of 'PyArrayObject'
d:\dokume~1\faust\lokale~1\temp\tmp57wwzd\src\fort ranobject.c(576) :
error C2039: 'weakreflist' : is not a member of 'PyArrayObject'

D:\Python23\include\Numeric/arrayobject.h(49) : see declaration
of 'PyArrayObject'
error: Command ""D:\Programme\Microsoft Visual Studio\VC98\BIN\cl.exe"
/c /nologo /Ox /MD /W3 /GX /DNDEBUG -ID:\Python23\include -Id
:\dokume~1\faust\lokale~1\temp\tmp57wwzd\src -ID:\Python23\include
-ID:\Python23\PC /Tcd:\dokume~1\faust\lokale~1\temp\tmp57wwzd\src
\fortranobject.c
/Fod:\dokume~1\faust\lokale~1\temp\tmp57wwzd\src\fo rtranobject.obj"
failed with exit status 2

Jul 18 '05 #4
"M. Faust" <ma*******@gmx.de> writes:
M. Faust wrote:
I got the same error with NumPy 23.3.
Markus


Try to find your "Numeric/arrayobject.h". Mine has

typedef struct {
PyObject_HEAD
char *data;
int nd;
int *dimensions, *strides;
PyObject *base;
PyArray_Descr *descr;
int flags;
PyObject *weakreflist;
} PyArrayObject;

and is from Numeric 23.3. In one of my installations updating to
Numeric to 23.3 solved a similar error.

Regards
Berthold

--
bh***@web.de / http://starship.python.net/crew/bhoel/
Jul 18 '05 #5
Thanks, Bethold for a good hint ...

I had in "Numeric/arrayobject.h"

typedef struct {
PyObject_HEAD
char *data;
int nd;
int *dimensions, *strides;
PyObject *base;
PyArray_Descr *descr;
int flags;
} PyArrayObject;

After adding

PyObject *weakreflist;

I could generate a hello.pyd. Python really is an incredibly versatile
and powerful tool.

Markus

Try to find your "Numeric/arrayobject.h". Mine has

typedef struct {
PyObject_HEAD
char *data;
int nd;
int *dimensions, *strides;
PyObject *base;
PyArray_Descr *descr;
int flags;
PyObject *weakreflist;
} PyArrayObject;

and is from Numeric 23.3. In one of my installations updating to
Numeric to 23.3 solved a similar error.

Regards
Berthold

Jul 18 '05 #6
M. Faust wrote:
Thanks, Bethold for a good hint ...

I had in "Numeric/arrayobject.h"

typedef struct {
PyObject_HEAD
char *data;
int nd;
int *dimensions, *strides;
PyObject *base;
PyArray_Descr *descr;
int flags;
} PyArrayObject;

After adding

PyObject *weakreflist;

I could generate a hello.pyd. Python really is an incredibly versatile
and powerful tool.


Don't do that. You are looking at an old version of
Numeric/arrayobject.h . Delete that directory and everything else
Numeric and re-install Numeric 23.3 . Check it again. It should have the
appropriate members, then.

--
Robert Kern
rk***@ucsd.edu

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
Jul 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Tim G. | last post by:
I am trying to use Win Python to ftp files from an AS/400 IFS directory down to my Windows machine. I seem to get stuck when I am trying to send a command to the AS/400 to switch file systems...
3
by: dricks dr | last post by:
Hi, I'm using the AxWebBrowser Control from microsoft in a C# application. It works fine, but i have many problems to hide the javascript error windows that appear when u visit a website with......
0
by: Benzari.Alex | last post by:
What I want to do is use the FileInfo module as described in PHP Architect's guide to security I installed the extension under linux and it works just fine... and i tried to install it on my...
5
by: Sile | last post by:
Hi, I've been trying to get f2py working on Windows XP, I am using Python 2.3. I'm new to python so I'm not too sure what I'm doing yet. I need the python-dev package to run f2py. I have been...
6
by: Sile | last post by:
Hello, I'm trying to get f2py working from the command line on windows XP. I have mingw32 as my C complier (after some advice on a previous thread) and Compaq Visual Fortran 6.5. Changing my C...
3
by: Vicente García | last post by:
Hello all, First of all sorry for my bad English... I am making up an application that can't show any error window (e.g. Can't write to memory address) if any...therefore I wish destroy or manage...
0
by: John [H2O] | last post by:
Hello, I have a module created from a Fortran file to read in unformatted binary fortran output. It works fine for some datasets, but crashes with others. The strange thing is it will loop...
0
by: John [H2O] | last post by:
I can try, would you mind giving very brief instructions on how to 'run it under gdb'... thanks! I'll post results over at numpy-discussions. Robert Kern-2 wrote: -- View this message in...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.