Comments (6)
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.
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.
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.
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.
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.
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)
- 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.