Comments (8)
@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.
Thanks.
('10.10', ('', '', ''), 'x86_64')
from pyql.
@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.
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.
elif sys.platform == 'linux2':
This seems be the problem; if you make your edits under the darwin
clause PyQL should find QuantLib.
from pyql.
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.
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.
It works now. Thanks!
from pyql.
Related Issues (20)
- test a examples file failed HOT 3
- Calls to CreditDefaultSwap.fair_upfront crash Python HOT 7
- def file generation HOT 2
- Test results with QuantLib 1.10
- compilation error HOT 3
- Problem with Python examples - american_option HOT 3
- testing pyql - errors HOT 2
- Odd issue with Period HOT 4
- Cython error + compilation error HOT 1
- Compilation Error on MacOS High Sierra HOT 15
- Cython version issue
- commit 27e9d9bf2 breaks compatibility with Quantlib < 1.13
- Adding OISRateHelpers HOT 13
- Building issue Win10x64 Python3.7.1 / x64 / VS2017 / QL1.15 / Boost 1.69 HOT 18
- Building on x64
- Build error error: ‘Microsecond’ is not a member of ‘QuantLib’ HOT 2
- install pyql in mac HOT 1
- error: ‘RelativePriceError’ is not a member of ‘QuantLib::CalibrationHelper’ HOT 4
- pyql/examples/data/df_libor.pkl cannot be loaded
- Pain point: Not enough documentation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyql.