|
From: Luigi B. <lui...@gm...> - 2025-03-08 15:37:31
|
Hello Aniket,
a few questions to try and diagnose the problem.
I'm assuming you followed the instructions at <
https://www.quantlib.org/install/linux.shtml> to install the C++ library,
right? When you ran `sudo make install` at some point in those
instructions, did the command complete successfully?
If you didn't specify a different target directory, the installation should
have written, for instance, `ql/version.hpp` (a whole `ql` directory, as a
matter of fact) in `/usr/local/include/`. You should also have a script
called `quantlib-config` in `/usr/local/bin/`. Is this the case? If you
try to run `quantlib-config` from a terminal, or if you run `which
quantlib-config`, do you find it?
If not, where did you install the library?
Later,
Luigi
P.S. This said, if you don't want to modify the wrappers, getting a
precompiled wheel with `pip install QuantLib` is not a make-do solution,
it's the recommended one.
On Sat, Mar 8, 2025 at 9:18 AM Aniket Basu <ani...@gm...> wrote:
> Hello all,
>
> I am a newbie here. I tried compiling the wheel for QuantLib-Python on my
> machine under lubuntu 24.04 lts, but failed multiple times. Ultimately, I
> had to make do with a precompiled wheel. I am pasting below my conversation
> with Dr Luigi Ballabio, who advised me to post it to the group for common
> benefit. If anyone has any idea why this is not working, please advise.
>
> Thanks in advance,
>
> Cheers,
>
> Aniket
>
> ---------- Forwarded message ---------
> From: Aniket Basu <ani...@gm...>
> Date: Fri, 7 Mar 2025 at 00:08
> Subject: Re: Seeking help with Quantlib Installation on Lubuntu 24.04 LTS
> To: Luigi Ballabio <lui...@gm...>
>
>
> Ok, I will do that tomorrow morning. It's 12 midnight here and I am late
> for dinner.
>
> Somehow on my computer I am failing to build the wheel. I finally used the
> wheel from PyPI.
>
> Thanks.
>
> On Fri, 7 Mar 2025 at 00:05, Luigi Ballabio <lui...@gm...>
> wrote:
>
>> May I ask you to post the question on the QuantLib mailing list, at <
>> qua...@li...>? This way it will be useful to
>> others, as well.
>>
>> Thanks,
>> Luigi
>>
>> Il Gio 6 Mar 2025, 19:18 Aniket Basu <ani...@gm...> ha scritto:
>>
>>> Actually the compilation seems to fail at the line:
>>>
>>> #include <ql/version.hpp>
>>>
>>> I beg your pardon, should there be a space between #include and
>>> <ql/version.hpp> ?
>>>
>>> I can see no reason why the compiler/interpreter cannot locate
>>> ql/version.hpp when it is very much there in the system.
>>>
>>>
>>>
>>> On Thu, 6 Mar 2025 at 21:51, Luigi Ballabio <lui...@gm...>
>>> wrote:
>>>
>>>> I know (you did mention the Python instructions in your mail), but
>>>> building the Python version requires the C++ version to be built and
>>>> installed. I think the instructions mention it.
>>>>
>>>> This said, if you don't mean to modify the C++ library or the wrappers,
>>>> you don't need to build the Python module (or the C++ one). You can
>>>> install a precompiled wheel from PyPI; the page you linked has instructions
>>>> for this, as well.
>>>>
>>>> Hope this helps,
>>>> Luigi
>>>>
>>>>
>>>> On Thu, Mar 6, 2025 at 5:16 PM Aniket Basu <ani...@gm...>
>>>> wrote:
>>>>
>>>>> Sorry, I should have been more specific:
>>>>>
>>>>> I meant the QuantLib-Python, not the C++ version.
>>>>>
>>>>> Sorry for bugging you.
>>>>>
>>>>> On Thu, 6 Mar 2025 at 21:32, Luigi Ballabio <lui...@gm...>
>>>>> wrote:
>>>>>
>>>>>> Hello,
>>>>>> please check that you followed the instructions at <
>>>>>> https://www.quantlib.org/install/linux.shtml> to build and also
>>>>>> install the library before trying to build the Python module.
>>>>>>
>>>>>> If the error still occurs, may I ask you to post the question on the
>>>>>> QuantLib mailing list, at <qua...@li...>?
>>>>>> This way it will be useful to others, as well.
>>>>>>
>>>>>> Thanks,
>>>>>> Luigi
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, Mar 6, 2025 at 4:42 PM Aniket Basu <ani...@gm...>
>>>>>> wrote:
>>>>>>
>>>>>>> Dear Dr Ballabio,
>>>>>>>
>>>>>>> While following the instructions here
>>>>>>>
>>>>>>> https://www.quantlib.org/install/linux-python.shtml
>>>>>>>
>>>>>>> once I run the command
>>>>>>>
>>>>>>> make
>>>>>>>
>>>>>>> under the Python directory, I get the following error messages:
>>>>>>>
>>>>>>> src/QuantLib/quantlib_wrap.cpp:5526:10: fatal error: ql/version.hpp:
>>>>>>> No such file or directory
>>>>>>> 5526 | #include <ql/version.hpp>
>>>>>>> | ^~~~~~~~~~~~~~~~
>>>>>>> compilation terminated.
>>>>>>> error: command '/usr/bin/g++' failed with exit code 1
>>>>>>>
>>>>>>> ERROR Backend subprocess exited when trying to invoke build_wheel
>>>>>>> make[1]: *** [Makefile:446: .build-stamp] Error 1
>>>>>>> make[1]: Leaving directory '/home/aniket/QuantLib-SWIG-1.36/Python'
>>>>>>> make: *** [Makefile:237: all] Error 2
>>>>>>>
>>>>>>> Please advise on how to proceed.
>>>>>>>
>>>>>>> Looking forward to hearing from you,
>>>>>>>
>>>>>>> Sincerely,
>>>>>>>
>>>>>>> Aniket Basu
>>>>>>> Assistant Professor
>>>>>>> Department of Physics
>>>>>>> Vidyasagar College
>>>>>>> Kolkata
>>>>>>>
>>>>>>> Email: ani...@gm...
>>>>>>>
>>>>>> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|