Building Python Extensions

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Building Python Extensions

newbie73
Is there a set of instructions that outlines each step needed to build the Python bindings for QuantLib?  If any of you have successfully built the Python bindings, could you post step-by-step instructions describing the process?

Thanks!

- Luis
Reply | Threaded
Open this post in threaded view
|

Re: Building Python Extensions

Luigi Ballabio
On Mon, 2007-07-09 at 06:09 -0700, newbie73 wrote:
> Is there a set of instructions that outlines each step needed to build the
> Python bindings for QuantLib?

On what platform?

Later,
        Luigi


--

Can't act. Slightly bald. Also dances.
-- RKO executive, reacting to Fred Astaire's screen test.
Cerf/Navasky, "The Experts Speak"



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Building Python Extensions

newbie73
I am using Windows XP with Python 2.4


Luigi Ballabio wrote
On Mon, 2007-07-09 at 06:09 -0700, newbie73 wrote:
> Is there a set of instructions that outlines each step needed to build the
> Python bindings for QuantLib?

On what platform?

Later,
        Luigi


--

Can't act. Slightly bald. Also dances.
-- RKO executive, reacting to Fred Astaire's screen test.
Cerf/Navasky, "The Experts Speak"



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
QuantLib-users mailing list
QuantLib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Building Python Extensions

Luigi Ballabio
On Mon, 2007-07-09 at 06:30 -0700, newbie73 wrote:
> I am using Windows XP with Python 2.4

- open a command-line prompt and change the directory to
  QuantLib-SWIG\Python

- execute the command

  set QL_DIR=C:\whatever\QuantLib-0.8.0

  (of course, you'll have to replace the path above with whatever
  directory you've installed QuantLib to)

- you're ready. Execute the command

  python setup.py build test

  to build the bindings. Python 2.4 on Windows will look for
  Visual C++ 7.1, so you'll need it installed. There might be ways
  to use other compilers, but I'm not sure about it. Also, I'm assuming
  that you're trying to build a released version. If you want to build
  from a Subversion snapshot, you'll need a couple of extra steps; drop
  us a line if this is the case.

- if everything worked, run

  python setup.py install

  and you'll install the module in the Python site library.

Hope this helps,
        Luigi


--

Glendower: I can call spirits from the vasty deep.
Hotspur: Why, so can I, or so can any man;
But will they come when you do call for them?
-- King Henry the Fourth Part I, Act III, Scene I



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Building Python Extensions

newbie73
When I execute:

python setup.py build test

I get a .NET error:

.NET Framework SDK needs to be installed before building extensions for Python.

I already have the SDK installed b/c I am using Visual Studio 2005 for C# development.  Any ideas what might be going on?

Luigi Ballabio wrote
On Mon, 2007-07-09 at 06:30 -0700, newbie73 wrote:
> I am using Windows XP with Python 2.4

- open a command-line prompt and change the directory to
  QuantLib-SWIG\Python

- execute the command

  set QL_DIR=C:\whatever\QuantLib-0.8.0

  (of course, you'll have to replace the path above with whatever
  directory you've installed QuantLib to)

- you're ready. Execute the command

  python setup.py build test

  to build the bindings. Python 2.4 on Windows will look for
  Visual C++ 7.1, so you'll need it installed. There might be ways
  to use other compilers, but I'm not sure about it. Also, I'm assuming
  that you're trying to build a released version. If you want to build
  from a Subversion snapshot, you'll need a couple of extra steps; drop
  us a line if this is the case.

- if everything worked, run

  python setup.py install

  and you'll install the module in the Python site library.

Hope this helps,
        Luigi


--

Glendower: I can call spirits from the vasty deep.
Hotspur: Why, so can I, or so can any man;
But will they come when you do call for them?
-- King Henry the Fourth Part I, Act III, Scene I



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
QuantLib-users mailing list
QuantLib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Able to build QuantLib ... Boost errors with Python

newbie73

The boost libraries cannot be found when running the python setup.py build test script.  I assume this has to do with a path variable not being set correctly.  I tried modifying the INCLUDE and PATH variables but none of these changes allowed the script to execute.

Any ideas?

Thanks,

- Luis
Reply | Threaded
Open this post in threaded view
|

Re: Able to build QuantLib ... Boost errors with Python

Luigi Ballabio
On Mon, 2007-07-09 at 09:22 -0700, newbie73 wrote:
> The boost libraries cannot be found when running the python setup.py build
> test script.  I assume this has to do with a path variable not being set
> correctly.  I tried modifying the INCLUDE and PATH variables but none of
> these changes allowed the script to execute.
>
> Any ideas?

You can try modifying the CL environment variable. You'll have to
add /I"path\to\boost" to it.

Luigi


--

Glendower: I can call spirits from the vasty deep.
Hotspur: Why, so can I, or so can any man;
But will they come when you do call for them?
-- King Henry the Fourth Part I, Act III, Scene I



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users