Git Product home page Git Product logo

Comments (6)

dpinte avatar dpinte commented on September 17, 2024

It seems that the path to the Quantlib includes is not provided properly:

quantlib/index.cpp:259:33: fatal error: ql/time/frequency.hpp: No such file or directory

Do you have Quantlib installed and include file available ?

from pyql.

mft-webdev avatar mft-webdev commented on September 17, 2024

No issue - the error was due to missing libraries.
For me ubuntu 12 and python 2.7
Installed Cython
make sure Boost and then Quantlib are installed
Then make sure python library distribute is installed
Also, I installed the python development installed sudo apt-get install python-dev.
Also, I installed (in Ubuntu) sudo apt-get install libquantlib0-dev.
I ran make clean
make build (This may not be needed since I also ran setup.py, but I did)
Then ran sudo python setup.py install.

If something doesn't work it's probably a missing library.
Good luck!

from pyql.

jobingr avatar jobingr commented on September 17, 2024

also struggling.. last bit of output of make build:

Cythonizing quantlib/time/schedule.pyx
running build_ext
gcc-4.2 not found, using clang instead
building 'quantlib.currency' extension
creating build
creating build/temp.macosx-10.6-intel-2.7
creating build/temp.macosx-10.6-intel-2.7/quantlib
clang -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3 -DHAVE_CONFIG_H -I/opt/local/include -I. -I./cpp_layer -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c quantlib/currency.cpp -o build/temp.macosx-10.6-intel-2.7/quantlib/currency.o
quantlib/currency.cpp:255:10: fatal error: 'ql/currency.hpp' file not found
#include "ql/currency.hpp"
^
1 error generated.
error: command 'clang' failed with exit status 1
make: *** [build] Error 1

I have boost... did install of quantlib and boost.
pip installed distribute.

can you clarify ;
"Also, I installed the python development installed sudo apt-get install python-dev.
Also, I installed (in Ubuntu) sudo apt-get install libquantlib0-dev."

I am on OSX Mountain Lion by the way

from pyql.

dpinte avatar dpinte commented on September 17, 2024

It seems you are using the Python version coming with MacOSX.

The issue you have is related to the include path. This one is defined in the setup.py and you should change it to point to the QuantLib includes. That will help resolving the .hpp files (the error shows it can't find currency.hpp)

I haven't tried to use clang to build the wrappers. I only tested that with gcc.

from pyql.

jobingr avatar jobingr commented on September 17, 2024

Thanks. I have a another install of python that I am using not the original one anymore. it is in /usr/local/bin: path before the OS python. All other packages working ok. most with pip install some have gcc compiler installed already needed it for build of numpy while back (as far as I can remember) also have Xcode so i think i have all the needed compilers.. thin I remember having to set system variables for another install. I am a bit of a nook at Unix so can you please be a bit more specific. SHould I be editing the setup.py file of pyql? which portions do I need to edit?
Thanks and sorry for being a noob

from pyql.

dpinte avatar dpinte commented on September 17, 2024

Yes, you should check the section at line 20 in setup.py. This is the default :

if sys.platform == 'darwin':
    INCLUDE_DIRS = ['/opt/local/include', '.', SUPPORT_CODE_INCLUDE]
    LIBRARY_DIRS = ["/opt/local/lib"]

You need to update /opt/localinclude to point to the includes of QuantLib and /opt/local/lib to point to the directory where the QuantLib shared libraries are available.

from pyql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.