On 15 Jun 2016, at 17:35, Luigi Ballabio <[hidden email]> wrote:They kind of make sense. Step 5 is no longer required. Step 10 is supposed to install the module where Anaconda can find it, but it seems dependent on where you have installed anaconda, so I'm not sure that on your system it would work as it is (by the way, do you use Anaconda at all?)Anyway: in a previous mail, you said you had the error while running "make -C Python" from QuantLib-SWIG. Does that work now? (In this mail you say you've followed http://quantlib.org/install/macosx.shtml, which only covers QuantLib installation, not QuantLib-SWIG). After that worked, did you also run "sudo make -C Python install"?LuigiOn Wed, Jun 15, 2016 at 11:33 AM quantengineer <[hidden email]> wrote:I installed 1.60 still i can’t call the library in ipython. However after following all instructions onthe example compilesonly problem is i can’t call the library from ipython get an error which says-------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-1-7585f083cf27> in <module>() 1 ----> 2 import QuantLib as qlImportError: No module named QuantLib
I found this on the net….. does it make sense?To install Quantlib and Quantlib-SWIG on Mac OS 10.11.2 (El Capitan) and get it to work on Anaconda and pyCharm, I’ve followed the steps below:
- Install Xcode 7.2, Apple’s Command Line Developer Tools and Macports
- Install boost with sudo port install boost
- Download Quantlib 1.7 from source forge and extracted it in /Users/my_account
- Run ./configure –enable-static –with-boost-include=/opt/local/include/ –with-boost-lib=/opt/local/lib/ –prefix=/opt/local/ CXXFLAGS=”-stdlib=libstdc++ -mmacosx-version-min=10.6″ LDFLAGS=”-stdlib=libstdc++ -mmacosx-version-min=10.6″
- Remove “-lboost_thread” from Examples/FRA/Makefile.in
- Run make && sudo make install
- Download Quantlib-SWIG from SF and untar
- Go into Python directory
- Run python setup.py build, python setup.py test
- Run python python setup.py install –prefix //anaconda/envs/your_virtual_env
Then you should be able to “import QuantLib as ql” in pyCharm, or any python IDE
On 14 Jun 2016, at 14:18, Luigi Ballabio [via QuantLib] <[hidden email]> wrote:You probably need a newer version. 1.43 is kind of old, and I think the compiler from El Capitan no longer compiles it correctly.LuigiOn Tue, Jun 14, 2016 at 3:20 PM Charles <<a href="<a href="x-msg://6/user/SendEmail.jtp?type=node&amp;node=17519&amp;i=0" class="">x-msg://6/user/SendEmail.jtp?type=node&node=17519&i=0" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:boost 1.43On 14 Jun 2016, at 11:19, Luigi Ballabio <<a href="<a href="x-msg://6/user/SendEmail.jtp?type=node&amp;node=17519&amp;i=1" class="">x-msg://6/user/SendEmail.jtp?type=node&node=17519&i=1" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:What version of Boost are you using?On Fri, Jun 10, 2016 at 9:39 PM quantengineer <<a href="<a href="x-msg://6/user/SendEmail.jtp?type=node&amp;node=17519&amp;i=2" class="">x-msg://6/user/SendEmail.jtp?type=node&node=17519&i=2" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:Ok this is what i have done now.....
1. QuantLib-1.8 Installation
cd /usr/local/lib/QuantLib-1.2.1
sudo ./configure
sudo make
sudo make install
this has worked ....
2. QuantLib-SWIG-1.1 Installation
cd /usr/local/lib/QuantLib-SWIG-1.1
sudo ./configure
sudo make -C Python
At this point i get the error
charless-MacBook-Pro-2:QuantLib-SWIG-1.7 charles$ sudo make -C Python
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-am
CXXFLAGS="-g -O2 -fno-strict-aliasing -Wno-unused -Wno-uninitialized
-Wno-sign-compare -Wno-write-strings" /opt/local/bin/python setup.py build
running build
running build_py
creating build
creating build/lib.macosx-10.11-x86_64-2.7
creating build/lib.macosx-10.11-x86_64-2.7/QuantLib
copying QuantLib/__init__.py -> build/lib.macosx-10.11-x86_64-2.7/QuantLib
copying QuantLib/QuantLib.py -> build/lib.macosx-10.11-x86_64-2.7/QuantLib
running build_ext
building 'QuantLib._QuantLib' extension
creating build/temp.macosx-10.11-x86_64-2.7
creating build/temp.macosx-10.11-x86_64-2.7/QuantLib
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -pipe -Os -fwrapv
-DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
-I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
-I/opt/local/include -I/opt/local/include -c QuantLib/quantlib_wrap.cpp -o
build/temp.macosx-10.11-x86_64-2.7/QuantLib/quantlib_wrap.o -Wno-unused -g
-O2 -fno-strict-aliasing -Wno-unused -Wno-uninitialized -Wno-sign-compare
-Wno-write-strings
In file included from QuantLib/quantlib_wrap.cpp:3940:
In file included from /opt/local/include/ql/quantlib.hpp:47:
In file included from /opt/local/include/ql/math/all.hpp:38:
In file included from /opt/local/include/ql/math/matrixutilities/all.hpp:4:
In file included from
/opt/local/include/ql/math/matrixutilities/basisincompleteordered.hpp:25:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/valarray:4036:59:
error:
'value_type' is a private member of
'boost::iterators::detail::operator_brackets_proxy<QuantLib::step_iterator<double
*> >'
__val_expr<_BinaryOp<__bit_shift_left<typename _Expr::value_type>,
^
QuantLib/quantlib_wrap.cpp:7271:23: note: while substituting deduced
template
arguments into function template 'operator<<' [with _Expr =
boost::iterators::detail::operator_brackets_proxy<QuantLib::step_iterator<double
*> >]
s << (*self)[i][j];
^
In file included from QuantLib/quantlib_wrap.cpp:3940:
In file included from /opt/local/include/ql/quantlib.hpp:47:
In file included from /opt/local/include/ql/math/all.hpp:38:
In file included from /opt/local/include/ql/math/matrixutilities/all.hpp:4:
In file included from
/opt/local/include/ql/math/matrixutilities/basisincompleteordered.hpp:25:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/valarray:4037:46:
error:
'value_type' is a private member of
'boost::iterators::detail::operator_brackets_proxy<QuantLib::step_iterator<double
*> >'
__scalar_expr<typename _Expr::value_type>, _Expr> >
^
2 errors generated.
error: command '/usr/bin/clang' failed with exit status 1
make[1]: *** [.build-stamp] Error 1
make: *** [all] Error 2
charless-MacBook-Pro-2:QuantLib-SWIG-1.7 charles$
--
View this message in context: http://quantlib.10058.n7.nabble.com/Installing-Quantlib-on-OS-EI-Capitan-tp17505p17512.html
Sent from the quantlib-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
QuantLib-users mailing list<a href="<a href="x-msg://6/user/SendEmail.jtp?type=node&amp;node=17519&amp;i=3" class="">x-msg://6/user/SendEmail.jtp?type=node&node=17519&i=3" target="_top" rel="nofollow" link="external" class="">[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
QuantLib-users mailing list<a href="<a href="x-msg://6/user/SendEmail.jtp?type=node&amp;node=17519&amp;i=4" class="">x-msg://6/user/SendEmail.jtp?type=node&node=17519&i=4" target="_top" rel="nofollow" link="external" class="">[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-usersIf you reply to this email, your message will be added to the discussion below:http://quantlib.10058.n7.nabble.com/Installing-Quantlib-on-OS-EI-Capitan-tp17505p17519.html
View this message in context: Re: Installing Quantlib on OS EI Capitan
Sent from the quantlib-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://pubads.g.doubleclick.net/gampad/clk?id=1444514421&iu=/41014381_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Free forum by Nabble | Disable Popup Ads | Edit this page |