RE: Python question

Posted by Yi Zhao-2 on
URL: http://quantlib.414.s1.nabble.com/RE-Python-question-tp3787p3791.html

Now I have successfully built the libQuantLib and libQuantLibFunctions
(though failed
 at "TestSuite" part) in cygwin environment. However, I still have
trouble with building
 the python part: mainly because "quantlib-config: not found". Thanks
again for the
 generous help!


$ python setup.py wrap
quantlib-config: not found
quantlib-config: not found
running wrap
Generating Python bindings for QuantLib...

$ python setup.py build
quantlib-config: not found
quantlib-config: not found
running build
running build_py
creating build
creating build/lib.cygwin-1.5.16-i686-2.4
creating build/lib.cygwin-1.5.16-i686-2.4/QuantLib
copying QuantLib/__init__.py ->
build/lib.cygwin-1.5.16-i686-2.4/QuantLib
copying QuantLib/QuantLib.py ->
build/lib.cygwin-1.5.16-i686-2.4/QuantLib
running build_ext
building 'QuantLib._QuantLib' extension
creating build/temp.cygwin-1.5.16-i686-2.4
creating build/temp.cygwin-1.5.16-i686-2.4/QuantLib
g++ -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
-I/usr/include/python2.4 -c Quan
Lib/quantlib_wrap.cpp -o
build/temp.cygwin-1.5.16-i686-2.4/QuantLib/quantlib_wrap.o -Wno-unused
In file included from QuantLib/quantlib_wrap.cpp:1795:
/usr/local/include/ql/qldefines.hpp:28:28: boost/config.hpp: No such
file or directory
/usr/local/include/ql/qldefines.hpp:29:29: boost/version.hpp: No such
file or directory
/usr/local/include/ql/qldefines.hpp:31:6: #error using an old version of
Boost, please update.
/usr/local/include/ql/qldefines.hpp:194:28: boost/limits.hpp: No such
file or directory
In file included from /usr/local/include/ql/date.hpp:28,
                 from /usr/local/include/ql/calendar.hpp:27,
                 from /usr/local/include/ql/core.hpp:26,
                 from /usr/local/include/ql/quantlib.hpp:26,
                 from QuantLib/quantlib_wrap.cpp:1826:
/usr/local/include/ql/errors.hpp:28:28: boost/assert.hpp: No such file
or directory
/usr/local/include/ql/errors.hpp:29:38: boost/current_function.hpp: No
such file or directory
/usr/local/include/ql/errors.hpp:30:32: boost/shared_ptr.hpp: No such
file or directory

.......

> -----Original Message-----
> From: Travis Brady [mailto:[hidden email]]
> Sent: Wednesday, May 18, 2005 7:05 PM
> To: Yi Zhao; Luigi Ballabio
> Cc: [hidden email]
> Subject: RE: [Quantlib-users] Python question
>
>
> Hi,
>
> At first glance it strikes me that you're using Cygwin Python
> (probably built with GCC 3.3 or so) and trying to compile a
> Python extension using Visual C++. Python extensions need to
> be compiled with the same compiler that the Python executable
> was compiled with.
>
> You could just try to compile QuantLib using gcc from Cygwin Bash.
>
> Hope that helps.
>
> Travis
>
> On Wed, 18 May 2005 17:12:53 -0400, "Yi Zhao"
> <[hidden email]>
> said:
> > Hi, I am having difficult building the Quantlib-Python from the CVS
> > download by  doing "python setup.py build " on the command line.
> > I have Visual C++ 7.1 and the python2.4 is in cygwin
> environment. Thanks
> > a lot!
> > Yi Zhao
> >
> > > -----Original Message-----
> > > From: Luigi Ballabio [mailto:[hidden email]]
> > > Sent: Thursday, April 28, 2005 5:47 AM
> > > To: Travis Brady
> > > Cc: [hidden email]
> > > Subject: Re: [Quantlib-users] Python question
> > >
> > >
> > >
> > > On 04/14/05 19:22:15, Travis Brady wrote:
> > > >
> > > > I haven't yet started to use QuantLib, but am very curious
> > > to take it
> > > > for a spin. How does one use Quantlib from Python?
> > > > I'm running Win2k and Python 2.4.1, can I just run the
> > > Quantlib windows
> > > > binary?  Do I need to download something special?
> > >
> > > Travis,
> > > there's no binary---the Windows installer actually
> > > installs the  
> > > source tree, and you'll have to compile it. Afterwards, you
> > > should download  
> > > the QuantLib-Python bindings and compile those as well.
> > > You'll probably  
> > > need to use Visual C++ 7.1, because Python requires it since
> > > version 2.4. Write back if you need compilation instructions,
> > > but the process isn't  
> > > hard: for the library, open the VC7 project and compile it;
> > > and for the  
> > > Python bindings, enter the QuantLib-Python directory from the
> > > command line  
> > > and type "python setup.py build test install".
> > >
> > > Later,
> > > Luigi
> > >
> > > ----------------------------------------
> > >
> > > Vin: It's like this fellow I knew in El Paso. One day, he
> > > just took all his clothes off and jumped in a mess of cactus.
> > > I asked him that same question, "Why?"
> > > Calvera: And?
> > > Vin: He said, "It seemed like a good idea at the time."
> > > -- The Magnificent Seven
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > SF.Net email is sponsored by: Tell us your software
> > > development plans! Take this survey and enter to win a
> > > one-year sub to SourceForge.net Plus IDC's 2005 look-ahead
> > > and a copy of this survey Click here to start!  
> > > http://www.idcswdc.com/cgi-bin/survey?id=> 105hix
> > >
> > > _______________________________________________
> > >
> > > Quantlib-users mailing list [hidden email]
> > > https://lists.sourceforge.net/lists/listinfo/quantlib-users
> > >
> --
>   Travis Brady
>   [hidden email]
>
>