Git Product home page Git Product logo

Comments (8)

jvkersch avatar jvkersch commented on August 14, 2024

@jonathanng Thanks for the report, can you do a import platform; platform.mac_ver() at the Python prompt and record what that gives you?

from pyql.

jonathanng avatar jonathanng commented on August 14, 2024

Thanks.

('10.10', ('', '', ''), 'x86_64')

from pyql.

jvkersch avatar jvkersch commented on August 14, 2024

@jonathanng Can you give this another shot? Apparently OS X Yosemite doesn't set the patch level of the version number and this was causing the setup script to fail.

from pyql.

jonathanng avatar jonathanng commented on August 14, 2024

This seems to be resolved. I am having another issue however

/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/extension.py:133: UserWarning: Unknown Extension options: 'cython_directives'
  warnings.warn(msg)
missing cimport in module 'quantlib.time': quantlib/instruments/credit_default_swap.pyx
missing cimport in module 'quantlib.pricingengines': quantlib/instruments/credit_default_swap.pyx
missing cimport in module 'quantlib.pricingengines': quantlib/instruments/option.pyx
running build
running build_py
running build_ext
building 'quantlib.cashflow' extension
clang -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/include -I. -I../sources/boost_1_55_0 -I./cpp_layer -I/usr/local/lib/python2.7/site-packages/numpy/core/include -I/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c quantlib/cashflow.cpp -o build/temp.macosx-10.10-x86_64-2.7/quantlib/cashflow.o
quantlib/cashflow.cpp:242:10: fatal error: 'ql/handle.hpp' file not found
#include "ql/handle.hpp"
         ^
1 error generated.
error: command 'clang' failed with exit status 1

Note, I did modify setup.py

elif sys.platform == 'linux2':
    # good for Debian / ubuntu 10.04 (with QL .99 installed by default)
    # INCLUDE_DIRS = ['/usr/local/include', '/usr/include', '.', SUPPORT_CODE_INCLUDE]
    # LIBRARY_DIRS = ['/usr/local/lib', '/usr/lib', ]
    # custom install of QuantLib 1.1
    INCLUDE_DIRS = ['/opt/QuantLib-1.4', '.', SUPPORT_CODE_INCLUDE]
    LIBRARY_DIRS = ['/opt/QuantLib-1.4/lib',]

from pyql.

jvkersch avatar jvkersch commented on August 14, 2024

elif sys.platform == 'linux2':

This seems be the problem; if you make your edits under the darwin clause PyQL should find QuantLib.

from pyql.

jonathanng avatar jonathanng commented on August 14, 2024

Thanks. I'll be more than happy to add a Mac version to the getting_started file when this all works.

Unfortunately I'm still getting an error.

/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/extension.py:133: UserWarning: Unknown Extension options: 'cython_directives'
  warnings.warn(msg)
missing cimport in module 'quantlib.time': quantlib/instruments/credit_default_swap.pyx
missing cimport in module 'quantlib.pricingengines': quantlib/instruments/credit_default_swap.pyx
missing cimport in module 'quantlib.pricingengines': quantlib/instruments/option.pyx
running build
running build_py
running build_ext
building 'quantlib.cashflow' extension
clang -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/include -I. -I../sources/boost_1_55_0 -I/opt/QuantLib-1.4 -I./cpp_layer -I/usr/local/lib/python2.7/site-packages/numpy/core/include -I/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c quantlib/cashflow.cpp -o build/temp.macosx-10.10-x86_64-2.7/quantlib/cashflow.o
quantlib/cashflow.cpp:4833:28: warning: unused function '__Pyx_PyObject_AsString' [-Wunused-function]
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
                           ^
quantlib/cashflow.cpp:4830:32: warning: unused function '__Pyx_PyUnicode_FromString' [-Wunused-function]
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
                               ^
quantlib/cashflow.cpp:314:29: warning: unused function '__Pyx_Py_UNICODE_strlen' [-Wunused-function]
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
                            ^
quantlib/cashflow.cpp:4970:33: warning: unused function '__Pyx_PyInt_FromSize_t' [-Wunused-function]
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
                                ^
quantlib/cashflow.cpp:3555:27: warning: unused function '__Pyx_ErrFetch' [-Wunused-function]
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
                          ^
quantlib/cashflow.cpp:3939:32: warning: unused function '__Pyx_GetItemInt_List_Fast' [-Wunused-function]
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                               ^
quantlib/cashflow.cpp:3953:32: warning: unused function '__Pyx_GetItemInt_Tuple_Fast' [-Wunused-function]
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                               ^
quantlib/cashflow.cpp:4399:26: warning: function '__Pyx_PyInt_As_int' is not needed and will not be emitted
      [-Wunneeded-internal-declaration]
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
                         ^
quantlib/cashflow.cpp:4520:27: warning: function '__Pyx_PyInt_As_long' is not needed and will not be emitted
      [-Wunneeded-internal-declaration]
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
                          ^
9 warnings generated.
clang++ -bundle -undefined dynamic_lookup -L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.10-x86_64-2.7/quantlib/cashflow.o -L/usr/local/lib -L/opt/QuantLib-1.4/lib -lQuantLib -o build/lib.macosx-10.10-x86_64-2.7/quantlib/cashflow.so -stdlib=libstdc++ -mmacosx-version-min=10.6
ld: warning: directory not found for option '-L/opt/QuantLib-1.4/lib'
ld: library not found for -lQuantLib
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang++' failed with exit status 1

from pyql.

jvkersch avatar jvkersch commented on August 14, 2024

I'll be more than happy to add a Mac version to the getting_started file when this all works.

That would be great!

ld: warning: directory not found for option '-L/opt/QuantLib-1.4/lib'

Does this folder exist, and do you have something like libQuantlib.dylib in it?

from pyql.

jonathanng avatar jonathanng commented on August 14, 2024

It works now. Thanks!

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.