|
From: Chirag D. <chi...@ya...> - 2026-03-11 11:38:41
|
Hi I have been trying to build the Python wheel as advised on https://www.quantlib.org/install/windows-python.shtml I used latest Quantlib 1.41 and Quantlib-SWIG 1.41 as well. 1) I set up the environment variables 2) This works fine 3) I get an error message which I have attached in Error.txt but its along the line of incompatible Quantlib /SWIG versions as some of the below have been deprecated. C:\local\QuantLib-SWIG-1.41\Python>python -m build --wheel --no-isolation Any help pls ?Thank you Chirag |
|
From: Chirag D. <chi...@ya...> - 2026-03-13 06:42:43
Attachments:
fxforward.i
testfxforward.py
|
Hi AllI built Quantlib with the newfxforward.hpp, fxforward.cpp , fxforwarddiscountingengine hpp.cpp which I had recently contributed and successfullyin my own version of Quantlib 1.41. All tests work I placed my fxforward.i file andswig runs successfully The wheel is generated successfully I am able to pip install the wheeland successfully can “import Quantlib as ql” and also can run certain Pythonfiles under SWIG in Examples and Tests (european-option.py,test_blackformula.py) For some reason my FX Forward testsall fail. (attached test_fxforward.py) How do I check if my FXForward classwas successfully exposed to the Python API ? If any tools available ? When I do ql. there is no dropdown either in IDE like VSCodeto see what ql functions are being exposed in Python ? Thank you all |
|
From: Luigi B. <lui...@gm...> - 2026-03-13 14:50:52
|
Hi Chirag, did you add your fxforward.i to the files included in ql.i ? Luigi On Fri, Mar 13, 2026 at 7:42 AM Chirag Desai <chi...@ya...> wrote: > Hi All > I built Quantlib with the new fxforward.hpp, fxforward.cpp , > fxforwarddiscountingengine hpp.cpp which I had recently contributed and > successfully in my own version of Quantlib 1.41. All tests work > > I placed my fxforward.i file and swig runs successfully > > The wheel is generated successfully > > I am able to pip install the wheel and successfully can “import Quantlib > as ql” and also can run certain Python files under SWIG in Examples and > Tests (european-option.py, test_blackformula.py) > > For some reason my FX Forward tests all fail. (attached test_fxforward.py) > > How do I check if my FXForward class was successfully exposed to the > Python API ? If any tools available ? > > When I do ql. there is no dropdown either in IDE like VSCode to see what > ql functions are being exposed in Python ? > > Thank you all > > > > > |
|
From: Chirag D. <chi...@ya...> - 2026-03-14 04:41:29
|
Thank you Mr Luigi
1) I added in ql.i and recompiled Quantlib as well
2) I get error messages now when building the wheel stating FXForward class cannot be found. I have attached the error messages.
Build was successful
On Friday, March 13, 2026 at 10:50:47 PM GMT+8, Luigi Ballabio <lui...@gm...> wrote:
Hi Chirag, did you add your fxforward.i to the files included in ql.i ?
Luigi
On Fri, Mar 13, 2026 at 7:42 AM Chirag Desai <chi...@ya...> wrote:
Hi AllI built Quantlib with the newfxforward.hpp, fxforward.cpp , fxforwarddiscountingengine hpp.cpp which I had recently contributed and successfullyin my own version of Quantlib 1.41. All tests work
I placed my fxforward.i file andswig runs successfully
The wheel is generated successfully
I am able to pip install the wheeland successfully can “import Quantlib as ql” and also can run certain Pythonfiles under SWIG in Examples and Tests (european-option.py,test_blackformula.py)
For some reason my FX Forward testsall fail. (attached test_fxforward.py)
How do I check if my FXForward classwas successfully exposed to the Python API ? If any tools available ?
When I do ql. there is no dropdown either in IDE like VSCodeto see what ql functions are being exposed in Python ?
Thank you all
|
|
From: Luigi B. <lui...@gm...> - 2026-03-14 16:33:14
Attachments:
1773463224015blob.jpg
1773463251236blob.jpg
|
Your new class is not in QuantLib 1.41. You need to check out the latest versions of QuantLib and QuantLib-SWIG from GitHub and use those ones. Luigi On Sat, Mar 14, 2026 at 5:41 AM Chirag Desai <chi...@ya...> wrote: > Thank you Mr Luigi > > 1) I added in ql.i and recompiled Quantlib as well > > 2) I get error messages now when building the wheel stating FXForward > class cannot be found. I have attached the error messages. > > Build was successful > [image: Inline image] > > [image: Inline image] > > > > On Friday, March 13, 2026 at 10:50:47 PM GMT+8, Luigi Ballabio < > lui...@gm...> wrote: > > > Hi Chirag, did you add your fxforward.i to the files included in ql.i ? > > Luigi > > > On Fri, Mar 13, 2026 at 7:42 AM Chirag Desai <chi...@ya...> > wrote: > > Hi All > I built Quantlib with the new fxforward.hpp, fxforward.cpp , > fxforwarddiscountingengine hpp.cpp which I had recently contributed and > successfully in my own version of Quantlib 1.41. All tests work > > I placed my fxforward.i file and swig runs successfully > > The wheel is generated successfully > > I am able to pip install the wheel and successfully can “import Quantlib > as ql” and also can run certain Python files under SWIG in Examples and > Tests (european-option.py, test_blackformula.py) > > For some reason my FX Forward tests all fail. (attached test_fxforward.py) > > How do I check if my FXForward class was successfully exposed to the > Python API ? If any tools available ? > > When I do ql. there is no dropdown either in IDE like VSCode to see what > ql functions are being exposed in Python ? > Thank you all > > > > > > |
|
From: Chirag D. <chi...@ya...> - 2026-03-16 07:53:51
|
Hi Luigi
I am very sorry but may not have been clear enough
1) I got the latest versions of Quantlib 1.41 and Quantlib-SWIG 1.412) I manually added the FXForward class in my local version and it builds fine and the test for it under testsuite works fine3) I added the fxforward.i and amended ql.i4) When I build the python wheel it cannot find the FX Forward class
(When I do the above exercise without the FX Forward class, I can build the wheel successfully and all works well)
On Sunday, March 15, 2026 at 12:33:03 AM GMT+8, Luigi Ballabio <lui...@gm...> wrote:
Your new class is not in QuantLib 1.41. You need to check out the latest versions of QuantLib and QuantLib-SWIG from GitHub and use those ones.
Luigi
On Sat, Mar 14, 2026 at 5:41 AM Chirag Desai <chi...@ya...> wrote:
Thank you Mr Luigi
1) I added in ql.i and recompiled Quantlib as well
2) I get error messages now when building the wheel stating FXForward class cannot be found. I have attached the error messages.
Build was successful
On Friday, March 13, 2026 at 10:50:47 PM GMT+8, Luigi Ballabio <lui...@gm...> wrote:
Hi Chirag, did you add your fxforward.i to the files included in ql.i ?
Luigi
On Fri, Mar 13, 2026 at 7:42 AM Chirag Desai <chi...@ya...> wrote:
Hi AllI built Quantlib with the newfxforward.hpp, fxforward.cpp , fxforwarddiscountingengine hpp.cpp which I had recently contributed and successfullyin my own version of Quantlib 1.41. All tests work
I placed my fxforward.i file andswig runs successfully
The wheel is generated successfully
I am able to pip install the wheeland successfully can “import Quantlib as ql” and also can run certain Pythonfiles under SWIG in Examples and Tests (european-option.py,test_blackformula.py)
For some reason my FX Forward testsall fail. (attached test_fxforward.py)
How do I check if my FXForward classwas successfully exposed to the Python API ? If any tools available ?
When I do ql. there is no dropdown either in IDE like VSCodeto see what ql functions are being exposed in Python ?
Thank you all
|
|
From: Luigi B. <lui...@gm...> - 2026-03-16 09:49:55
|
Hello Chirag,
please don't use the latest 1.41. Backporting your class manually
might skip some steps. Use a checkout from the latest master from GitHub,
where your FxForward is already included correctly. Use a checkout for the
SWIG part too; you'll have to do that anyway in order to open a pull
request.
Luigi
On Mon, Mar 16, 2026 at 8:53 AM Chirag Desai <chi...@ya...>
wrote:
> Hi Luigi
>
> I am very sorry but may not have been clear enough
>
> 1) I got the latest versions of Quantlib 1.41 and Quantlib-SWIG 1.41
> 2) I manually added the FXForward class in my local version and it builds
> fine and the test for it under testsuite works fine
> 3) I added the fxforward.i and amended ql.i
> 4) When I build the python wheel it cannot find the FX Forward class
>
> (When I do the above exercise without the FX Forward class, I can build
> the wheel successfully and all works well)
>
> [image: Inline image]
>
> On Sunday, March 15, 2026 at 12:33:03 AM GMT+8, Luigi Ballabio <
> lui...@gm...> wrote:
>
>
> Your new class is not in QuantLib 1.41. You need to check out the latest
> versions of QuantLib and QuantLib-SWIG from GitHub and use those ones.
>
> Luigi
>
>
> On Sat, Mar 14, 2026 at 5:41 AM Chirag Desai <chi...@ya...>
> wrote:
>
> Thank you Mr Luigi
>
> 1) I added in ql.i and recompiled Quantlib as well
>
> 2) I get error messages now when building the wheel stating FXForward
> class cannot be found. I have attached the error messages.
>
> Build was successful
> [image: Inline image]
>
> [image: Inline image]
>
>
>
> On Friday, March 13, 2026 at 10:50:47 PM GMT+8, Luigi Ballabio <
> lui...@gm...> wrote:
>
>
> Hi Chirag, did you add your fxforward.i to the files included in ql.i ?
>
> Luigi
>
>
> On Fri, Mar 13, 2026 at 7:42 AM Chirag Desai <chi...@ya...>
> wrote:
>
> Hi All
> I built Quantlib with the new fxforward.hpp, fxforward.cpp ,
> fxforwarddiscountingengine hpp.cpp which I had recently contributed and
> successfully in my own version of Quantlib 1.41. All tests work
>
> I placed my fxforward.i file and swig runs successfully
>
> The wheel is generated successfully
>
> I am able to pip install the wheel and successfully can “import Quantlib
> as ql” and also can run certain Python files under SWIG in Examples and
> Tests (european-option.py, test_blackformula.py)
>
> For some reason my FX Forward tests all fail. (attached test_fxforward.py)
>
> How do I check if my FXForward class was successfully exposed to the
> Python API ? If any tools available ?
>
> When I do ql. there is no dropdown either in IDE like VSCode to see what
> ql functions are being exposed in Python ?
> Thank you all
>
>
>
>
>
>
|
|
From: Luigi B. <lui...@gm...> - 2026-03-11 16:34:31
|
It looks like you're not using QuantLib 1.41 (the release you find at < https://github.com/lballabio/QuantLib/releases/tag/v1.41> but a checkout of the git repository, which is more recent than 1.41 and removed a few deprecated classes. If that's the case, you also need a checkout of the git repository for QuantLib-SWIG. Luigi On Wed, Mar 11, 2026 at 12:38 PM Chirag Desai <chi...@ya...> wrote: > Hi > > I have been trying to build the Python wheel as advised on > > https://www.quantlib.org/install/windows-python.shtml > > I used latest Quantlib 1.41 and Quantlib-SWIG 1.41 as well. > > 1) I set up the environment variables > > [image: Inline image] > > 2) This works fine > [image: Inline image] > > 3) I get an error message which I have attached in Error.txt but its along > the line of incompatible Quantlib /SWIG versions as some of the below have > been deprecated. > > C:\local\QuantLib-SWIG-1.41\Python>python -m build --wheel --no-isolation > > [image: Inline image] > Any help pls ? > Thank you > Chirag > > > > > > |