Git Product home page Git Product logo

Comments (4)

jvkersch avatar jvkersch commented on August 14, 2024

@linkedrank Do you have QuantLib installed in /usr/local/? The installation instructions that you quote refer to /opt/local/ and the linker error suggests that PyQL can't find the QuantLib library.

from pyql.

linkedrank avatar linkedrank commented on August 14, 2024

Hi Joris - thanks for the response. I was able to successfully build the library after I fixed the path issue by modifying setup.py with the proper include and library paths. I was also able to run the examples in place in the original directory but when I copy or link the quantlib directory to my project directory, I get import errors. Any idea? I'm guessing I'm doing something stupid. (Obviously it's finding the directory itself and getting to quantlib.instruments.api but having trouble importing some of the classes)

import american_option

File "/Users/marywilliamson1/Documents/projects/pnlbooker/server/app/american_option.py", line 10, in
from quantlib.instruments.api import AmericanExercise, VanillaOption, Put
File "/Users/marywilliamson1/Documents/projects/pnlbooker/server/app/quantlib/instruments/api.py", line 1, in
from .bonds import FixedRateBond, ZeroCouponBond
ImportError: cannot import name FixedRateBond

from pyql.

jvkersch avatar jvkersch commented on August 14, 2024

when I copy or link the quantlib directory to my project directory, I get import errors. Any idea?

There should be no need to move the quantlib folder, you can just run make install (after doing make build). This will install PyQL in your site-packages folder, and after that, importing from quantlib should work fine.

from pyql.

linkedrank avatar linkedrank commented on August 14, 2024

Thanks a lot - that worked.

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.