473,671 Members | 2,271 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

f2py usage problem

Hi Python gurus,
I have installed numpy and interested in testing f2py module using the
first example in the documentation.

First I tried:

C:\test>python "C:\Program Files\Python25\ Scripts\f2py.py " -c fib1.f
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --
compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --
fcompiler options
running build_src
building extension "untitled" sources
f2py options: []
f2py:c:\docume~ 1\e6462\locals~ 1\temp\tmpzcktr q
\src.win32-2.5\untitledmod ule.c
creating c:\docume~1\e64 62\locals~1\tem p\tmpzcktrq
creating c:\docume~1\e64 62\locals~1\tem p\tmpzcktrq\src .win32-2.5
Reading fortran codes...
Reading file 'fib1.f' (format:fix,str ict)
Post-processing...
Block: untitled
Block: fib
Post-processing (stage 2)...
Building modules...
Building module "untitled". ..
Constructing wrapper function "fib"...
fib(a,[n])
Wrote C/API module "untitled" to file "c:
\docume~1\e6462 \locals~1\temp\ tmpzcktrq\src.w in32-2.5/
untitledmodule. c"
adding 'c:\docume~1\e6 462\locals~1\te mp\tmpzcktrq
\src.win32-2.5\fortranobje ct.c' to sources.
adding 'c:\docume~1\e6 462\locals~1\te mp\tmpzcktrq\sr c.win32-2.5' to
include_dirs.
copying C:\Progra~1\pyt hon25\lib\site-packages\numpy-1.0.4.0002-py2.5-
win32.egg\
numpy\f2py\src\ fortranobject.c -c:\docume~1\e64 62\locals~1\tem p
\tmpzcktrq\src. win32-2.5
copying C:\Progra~1\pyt hon25\lib\site-packages\numpy-1.0.4.0002-py2.5-
win32.egg\
numpy\f2py\src\ fortranobject.h -c:\docume~1\e64 62\locals~1\tem p
\tmpzcktrq\src. win32-2.5
running build_ext
No module named msvccompiler in numpy.distutils ; trying from distutils
error: Python was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible
binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin
installed,
you can try compiling with MingW32, by passing "-c mingw32" to
setup.py.
Then I installed mingw32 and tried to pass "-c mingw32" to setup.py as
below, but got another error:
C:\tests>python "C:\Program Files\Python25\ Lib\site-packages
\numpy-1.0.4.0002-py2.5-win32.egg\numpy \f2py\setup.py" -c mingw32
Warning: Assuming default configuration (C:\Program Files\Python25\ Lib
\site-pack
ages\numpy-1.0.4.0002-py2.5-win32.egg\numpy \f2py\lib\parse r/
{setup_parser,s etup}.py was not found)
Appending f2py.lib.parser configuration to f2py.lib
Ignoring attempt to set 'name' (from 'f2py.lib' to 'f2py.lib.parse r')
Warning: Assuming default configuration (C:\Program Files\Python25\ Lib
\site-packages\numpy-1.0.4.0002-py2.5-win32.egg\numpy \f2py\lib\extge n/
{setup_extgen,s etup}.py was not found)
Appending f2py.lib.extgen configuration to f2py.lib
Ignoring attempt to set 'name' (from 'f2py.lib' to 'f2py.lib.extge n')
Appending f2py.lib configuration to f2py
Ignoring attempt to set 'name' (from 'f2py' to 'f2py.lib')
F2PY Version 2_4422
Traceback (most recent call last):
File "C:\Program Files\Python25\ Lib\site-packages\numpy-1.0.4.0002-
py2.5-win32.egg\numpy \f2py\setup.py" , line 130, in <module>
**config)
TypeError: setup() got multiple values for keyword argument 'version'

Version (as printed out to be "2_4422") doesn't look like to be
multiple value as the message says...
I have tried different machine with different python version
installation (2.5, 2.4) and also searched the forum without finding my
answer.

Is there anybody out there so kind as to help me with this?
Thanks...
/Ben
Nov 11 '08 #1
1 3962
bk******@gmail. com wrote:
Hi Python gurus,
I have installed numpy and interested in testing f2py module using the
first example in the documentation.
Hi,

You will want to ask numpy questions on the numpy mailing list.

http://www.scipy.org/Mailing_Lists
First I tried:

C:\test>python "C:\Program Files\Python25\ Scripts\f2py.py " -c fib1.f
....
running build_ext
No module named msvccompiler in numpy.distutils ; trying from distutils
error: Python was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible
binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin
installed,
you can try compiling with MingW32, by passing "-c mingw32" to
setup.py.
Then I installed mingw32 and tried to pass "-c mingw32" to setup.py as
below, but got another error:
C:\tests>python "C:\Program Files\Python25\ Lib\site-packages
\numpy-1.0.4.0002-py2.5-win32.egg\numpy \f2py\setup.py" -c mingw32
That's not the setup.py it is talking about. f2py is used both as a program and
a library inside your own distutils setup.py scripts. Internally, the f2py
program uses distutils to build the extension module. The error message you see
comes from distutils, so it is (confusingly, in this case) assuming you are
calling distutils from a setup.py script.

The corresponding f2py program option would be --compiler=mingw3 2 . See "f2py
-h" for all of the command line options.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco

Nov 11 '08 #2

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

Similar topics

1
2653
by: Jerome | last post by:
Hi all, We have a VB App and MS SQL 7 driven web site running on a dual processor server. Lately, we've been suffering a problem whereby MS SQL Server seems to consume all available CPU power. The web application grinds to an unusable slow speed when this happens, and we tend to reboot the server in an attempt to fix.
10
4043
by: Richard R Plourde | last post by:
I've got a problem that IE doesn't seem to use the entire font unicode subgroups from a hinted font file. When I display the following web page in IE 6 as opposed to Firefox 1.0 PR. Check out the web page in question... http://clientserver.home.comcast.net/unicode.html If you examine, for a few examples, characters such as square root (&amp;#8730;), prime (&amp;#8242;) and double prime (&amp;#8243;).
2
1150
by: 2003et | last post by:
My program uses 200 radio button, 20 panel and about 150 textbox... But I cannot understand its memory usage... It uses about 30 MB while it is running without any db connection or something else... Do you have any idea? Thanks...
3
1232
by: sebapi | last post by:
Hello! I have windows forms app (C# 2.0) which take about 60MB ram. I noticed when I minimize it then memory usage drops to about 4MB. When I maximize it then memory usage is about 16MB and then it is constant. What is the reason of such behaviour ? Regards. Sebastian
1
1835
by: | last post by:
weve installed our asp.net 11. (32 bit) web app on windows 2002 64 bit server running under 32 bit emulation mode. should work ok, but were seeing cpu at 100%, but the server is a qaud dual core brand new server! old server running better. what to look for? thanks steph
1
1587
by: fishscience | last post by:
I have a problem about memory usage. The code is as below: #include <list> int main(int argc, char* argv) { { std::list<void*ptr_list; { for (int i=0; i<9368; i++) {
2
1598
by: Mechul | last post by:
Hi people i need serious help here.. I have a forum and my hosting company suspended it cuz of the high usage of sql. We did everything to make lower the usage but its still high. it was Generated in 2.0792990 seconds (18.30% PHP / 50-80 % MySQL) MySQL Queries:152 / Global Parsing Time: 0.4743950 / Memory Usage: 4.01 MB PHP version: 4.4.4 / Server Load: Bilinmeyen / GZip Compression: Enabled
15
2542
by: arunbalait | last post by:
HI I am using Windows XP SP2, and I own P4 processor. My problem is TaskManager showing my CPU usage is at 100%. No programs are running and checked the no of processes that uses high CPU usage, all seems running good. But CPU usage showing 100% always. what is the problem with it? I have tried all the familiar antivirus programs but found nothing somebody give me suggestions plz
0
1966
by: =?Utf-8?B?Sm9uYXRoYW4gU3RlaW5iZXJn?= | last post by:
I am looking at using the rotuer sample that comes with the samples in the Vista sdk (Microsoft SDKs\Windows\v6.0\Samples\WCFSamples\TechnologySamples\Scenario\Router\CS\router) I am using .Net 3.0, C# 2.0, on win2K3 servers. I have stripped down almost all of the non-essential code from the message processor , leaving me with this code: //ProcessMessage implemenation
0
8473
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8911
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8667
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6222
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5692
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4402
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2808
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2048
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.