473,241 Members | 1,528 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,241 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 2185
"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: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
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...

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.