Getting Python bindings in QuantLib-SWIG-1.4 to work in OS X?

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Getting Python bindings in QuantLib-SWIG-1.4 to work in OS X?

Richard Stanton
I've compiled both QuantLib-1.4 and QuantLib-SWIG-1.4 (Python bindings) on
my Mac, but get errors when I try to run the Python test code. Has anyone
got this to work? Here are the details:

- Machine is running OS X 10.9.2, Xcode 5.1, and "gcc --version" reports

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix

   - Install Mac Ports boost 1.55.0 using "sudo port install boost"
   - Download and extract Quantlib-1.4
   - Following instructions at http://quantlib.org/install/macosx.shtml,
run

   ./configure --enable-static --with-boost-include=/opt/local/include/
--with-boost-lib=/opt/local/lib/ --prefix=/opt/local/

   make

   - Compilation completes fine. Running test suite, it tells me it's
running 567 test cases, and completes with no errors.

So far so good. Quantlib seems to be running fine. Now to install
quantlib-SWIG-1.4:

   - Download and extract
   - cd to Python subdirectory.
- After making sure the compiler/linker can find the ql header files and
libQuantLib.a, run "python setup.py build".
- Compiles and links (apparently) fine.
   - Now run "python setup.py test"

running test
running build
running build_py
running build_ext
Traceback (most recent call last):
  File "setup.py", line 239, in <module>
    'build_ext': my_build_ext
  File "/Users/stanton/anaconda/lib/python2.7/distutils/core.py", line
152, in setup
    dist.run_commands()
  File "/Users/stanton/anaconda/lib/python2.7/distutils/dist.py", line
953, in run_commands
    self.run_command(cmd)
  File "/Users/stanton/anaconda/lib/python2.7/distutils/dist.py", line
972, in run_command
    cmd_obj.run()
  File "setup.py", line 58, in run
    module = __import__('QuantLibTestSuite', globals(), locals(), [''])
  File "test/QuantLibTestSuite.py", line 22, in <module>
    from date import DateTest
  File "test/date.py", line 18, in <module>
    import QuantLib
  File "build/lib.macosx-10.5-x86_64-2.7/QuantLib/__init__.py", line 24,
in <module>
    from QuantLib import *
  File "build/lib.macosx-10.5-x86_64-2.7/QuantLib/QuantLib.py", line 28,
in <module>
    _QuantLib = swig_import_helper()
  File "build/lib.macosx-10.5-x86_64-2.7/QuantLib/QuantLib.py", line 24,
in swig_import_helper
    _mod = imp.load_module('_QuantLib', fp, pathname, description)
ImportError:
dlopen(build/lib.macosx-10.5-x86_64-2.7/QuantLib/_QuantLib.so, 2): Symbol
not found: __ZThn112_N8QuantLib19CappedFlooredCoupon6updateEv
  Referenced from: build/lib.macosx-10.5-x86_64-2.7/QuantLib/_QuantLib.so
  Expected in: dynamic lookup

Has anyone got this working on the same setup?

Thanks.

Richard Stanton


------------------------------------------------------------------------------
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Getting Python bindings in QuantLib-SWIG-1.4 to work in OS X?

Luigi Ballabio
Not sure if it applies, but there's a note in <http://quantlib.org/install/macosx.shtml> about a few compilation flags needed in Mavericks. Do they help?

Luigi



On Tue, Apr 1, 2014 at 7:58 PM, Richard Stanton <[hidden email]> wrote:
I've compiled both QuantLib-1.4 and QuantLib-SWIG-1.4 (Python bindings) on
my Mac, but get errors when I try to run the Python test code. Has anyone
got this to work? Here are the details:

- Machine is running OS X 10.9.2, Xcode 5.1, and "gcc --version" reports

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix

   - Install Mac Ports boost 1.55.0 using "sudo port install boost"
   - Download and extract Quantlib-1.4
   - Following instructions at http://quantlib.org/install/macosx.shtml,
run

   ./configure --enable-static --with-boost-include=/opt/local/include/
--with-boost-lib=/opt/local/lib/ --prefix=/opt/local/

   make

   - Compilation completes fine. Running test suite, it tells me it's
running 567 test cases, and completes with no errors.

So far so good. Quantlib seems to be running fine. Now to install
quantlib-SWIG-1.4:

   - Download and extract
   - cd to Python subdirectory.
- After making sure the compiler/linker can find the ql header files and
libQuantLib.a, run "python setup.py build".
- Compiles and links (apparently) fine.
   - Now run "python setup.py test"

running test
running build
running build_py
running build_ext
Traceback (most recent call last):
  File "setup.py", line 239, in <module>
    'build_ext': my_build_ext
  File "/Users/stanton/anaconda/lib/python2.7/distutils/core.py", line
152, in setup
    dist.run_commands()
  File "/Users/stanton/anaconda/lib/python2.7/distutils/dist.py", line
953, in run_commands
    self.run_command(cmd)
  File "/Users/stanton/anaconda/lib/python2.7/distutils/dist.py", line
972, in run_command
    cmd_obj.run()
  File "setup.py", line 58, in run
    module = __import__('QuantLibTestSuite', globals(), locals(), [''])
  File "test/QuantLibTestSuite.py", line 22, in <module>
    from date import DateTest
  File "test/date.py", line 18, in <module>
    import QuantLib
  File "build/lib.macosx-10.5-x86_64-2.7/QuantLib/__init__.py", line 24,
in <module>
    from QuantLib import *
  File "build/lib.macosx-10.5-x86_64-2.7/QuantLib/QuantLib.py", line 28,
in <module>
    _QuantLib = swig_import_helper()
  File "build/lib.macosx-10.5-x86_64-2.7/QuantLib/QuantLib.py", line 24,
in swig_import_helper
    _mod = imp.load_module('_QuantLib', fp, pathname, description)
ImportError:
dlopen(build/lib.macosx-10.5-x86_64-2.7/QuantLib/_QuantLib.so, 2): Symbol
not found: __ZThn112_N8QuantLib19CappedFlooredCoupon6updateEv
  Referenced from: build/lib.macosx-10.5-x86_64-2.7/QuantLib/_QuantLib.so
  Expected in: dynamic lookup

Has anyone got this working on the same setup?

Thanks.

Richard Stanton


------------------------------------------------------------------------------
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users



--
<https://implementingquantlib.blogspot.com>
<https://twitter.com/lballabio>

------------------------------------------------------------------------------

_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Getting Python bindings in QuantLib-SWIG-1.4 to work in OS X?

Richard Stanton
I'll try it out. I assumed this was about getting QuantLib to install at all, and that worked fine on my machine, but maybe this is more about linking with other programs? I couldn't tell. However, the fact that the same installation strategy on another machine, running OS X 10.8.5, seemed to work fine, does suggest it's something Mavericks-specific.

Also, I think there may be a minor typo in those compilation flags – should it say –stdlib instead of –stlib? 

Oh, one more thing – if I set those flags for compiling QuantLib, does that also mean I need to recompile Boost? 

Thanks.

Richard

From: "'luigi. com'" <[hidden email]>
Date: Thursday, April 3, 2014 12:25 AM
To: Richard Stanton <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Subject: Re: [Quantlib-users] Getting Python bindings in QuantLib-SWIG-1.4 to work in OS X?

Not sure if it applies, but there's a note in <http://quantlib.org/install/macosx.shtml> about a few compilation flags needed in Mavericks. Do they help?

Luigi



On Tue, Apr 1, 2014 at 7:58 PM, Richard Stanton <[hidden email]> wrote:
I've compiled both QuantLib-1.4 and QuantLib-SWIG-1.4 (Python bindings) on
my Mac, but get errors when I try to run the Python test code. Has anyone
got this to work? Here are the details:

- Machine is running OS X 10.9.2, Xcode 5.1, and "gcc --version" reports

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix

   - Install Mac Ports boost 1.55.0 using "sudo port install boost"
   - Download and extract Quantlib-1.4
   - Following instructions at http://quantlib.org/install/macosx.shtml,
run

   ./configure --enable-static --with-boost-include=/opt/local/include/
--with-boost-lib=/opt/local/lib/ --prefix=/opt/local/

   make

   - Compilation completes fine. Running test suite, it tells me it's
running 567 test cases, and completes with no errors.

So far so good. Quantlib seems to be running fine. Now to install
quantlib-SWIG-1.4:

   - Download and extract
   - cd to Python subdirectory.
- After making sure the compiler/linker can find the ql header files and
libQuantLib.a, run "python setup.py build".
- Compiles and links (apparently) fine.
   - Now run "python setup.py test"

running test
running build
running build_py
running build_ext
Traceback (most recent call last):
  File "setup.py", line 239, in <module>
    'build_ext': my_build_ext
  File "/Users/stanton/anaconda/lib/python2.7/distutils/core.py", line
152, in setup
    dist.run_commands()
  File "/Users/stanton/anaconda/lib/python2.7/distutils/dist.py", line
953, in run_commands
    self.run_command(cmd)
  File "/Users/stanton/anaconda/lib/python2.7/distutils/dist.py", line
972, in run_command
    cmd_obj.run()
  File "setup.py", line 58, in run
    module = __import__('QuantLibTestSuite', globals(), locals(), [''])
  File "test/QuantLibTestSuite.py", line 22, in <module>
    from date import DateTest
  File "test/date.py", line 18, in <module>
    import QuantLib
  File "build/lib.macosx-10.5-x86_64-2.7/QuantLib/__init__.py", line 24,
in <module>
    from QuantLib import *
  File "build/lib.macosx-10.5-x86_64-2.7/QuantLib/QuantLib.py", line 28,
in <module>
    _QuantLib = swig_import_helper()
  File "build/lib.macosx-10.5-x86_64-2.7/QuantLib/QuantLib.py", line 24,
in swig_import_helper
    _mod = imp.load_module('_QuantLib', fp, pathname, description)
ImportError:
dlopen(build/lib.macosx-10.5-x86_64-2.7/QuantLib/_QuantLib.so, 2): Symbol
not found: __ZThn112_N8QuantLib19CappedFlooredCoupon6updateEv
  Referenced from: build/lib.macosx-10.5-x86_64-2.7/QuantLib/_QuantLib.so
  Expected in: dynamic lookup

Has anyone got this working on the same setup?

Thanks.

Richard Stanton


------------------------------------------------------------------------------
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users



--
<https://implementingquantlib.blogspot.com>
<https://twitter.com/lballabio>

------------------------------------------------------------------------------

_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Getting Python bindings in QuantLib-SWIG-1.4 to work in OS X?

Luigi Ballabio
Richard,
    apologies for dropping the ball on this one. Did you have any success?

Luigi



On Thu, Apr 3, 2014 at 9:49 AM, Richard Stanton <[hidden email]> wrote:
I'll try it out. I assumed this was about getting QuantLib to install at all, and that worked fine on my machine, but maybe this is more about linking with other programs? I couldn't tell. However, the fact that the same installation strategy on another machine, running OS X 10.8.5, seemed to work fine, does suggest it's something Mavericks-specific.

Also, I think there may be a minor typo in those compilation flags – should it say –stdlib instead of –stlib? 

Oh, one more thing – if I set those flags for compiling QuantLib, does that also mean I need to recompile Boost? 

Thanks.

Richard

From: "'luigi. com'" <[hidden email]>
Date: Thursday, April 3, 2014 12:25 AM
To: Richard Stanton <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Subject: Re: [Quantlib-users] Getting Python bindings in QuantLib-SWIG-1.4 to work in OS X?

Not sure if it applies, but there's a note in <http://quantlib.org/install/macosx.shtml> about a few compilation flags needed in Mavericks. Do they help?

Luigi



On Tue, Apr 1, 2014 at 7:58 PM, Richard Stanton <[hidden email]> wrote:
I've compiled both QuantLib-1.4 and QuantLib-SWIG-1.4 (Python bindings) on
my Mac, but get errors when I try to run the Python test code. Has anyone
got this to work? Here are the details:

- Machine is running OS X 10.9.2, Xcode 5.1, and "gcc --version" reports

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix

   - Install Mac Ports boost 1.55.0 using "sudo port install boost"
   - Download and extract Quantlib-1.4
   - Following instructions at http://quantlib.org/install/macosx.shtml,
run

   ./configure --enable-static --with-boost-include=/opt/local/include/
--with-boost-lib=/opt/local/lib/ --prefix=/opt/local/

   make

   - Compilation completes fine. Running test suite, it tells me it's
running 567 test cases, and completes with no errors.

So far so good. Quantlib seems to be running fine. Now to install
quantlib-SWIG-1.4:

   - Download and extract
   - cd to Python subdirectory.
- After making sure the compiler/linker can find the ql header files and
libQuantLib.a, run "python setup.py build".
- Compiles and links (apparently) fine.
   - Now run "python setup.py test"

running test
running build
running build_py
running build_ext
Traceback (most recent call last):
  File "setup.py", line 239, in <module>
    'build_ext': my_build_ext
  File "/Users/stanton/anaconda/lib/python2.7/distutils/core.py", line
152, in setup
    dist.run_commands()
  File "/Users/stanton/anaconda/lib/python2.7/distutils/dist.py", line
953, in run_commands
    self.run_command(cmd)
  File "/Users/stanton/anaconda/lib/python2.7/distutils/dist.py", line
972, in run_command
    cmd_obj.run()
  File "setup.py", line 58, in run
    module = __import__('QuantLibTestSuite', globals(), locals(), [''])
  File "test/QuantLibTestSuite.py", line 22, in <module>
    from date import DateTest
  File "test/date.py", line 18, in <module>
    import QuantLib
  File "build/lib.macosx-10.5-x86_64-2.7/QuantLib/__init__.py", line 24,
in <module>
    from QuantLib import *
  File "build/lib.macosx-10.5-x86_64-2.7/QuantLib/QuantLib.py", line 28,
in <module>
    _QuantLib = swig_import_helper()
  File "build/lib.macosx-10.5-x86_64-2.7/QuantLib/QuantLib.py", line 24,
in swig_import_helper
    _mod = imp.load_module('_QuantLib', fp, pathname, description)
ImportError:
dlopen(build/lib.macosx-10.5-x86_64-2.7/QuantLib/_QuantLib.so, 2): Symbol
not found: __ZThn112_N8QuantLib19CappedFlooredCoupon6updateEv
  Referenced from: build/lib.macosx-10.5-x86_64-2.7/QuantLib/_QuantLib.so
  Expected in: dynamic lookup

Has anyone got this working on the same setup?

Thanks.

Richard Stanton


------------------------------------------------------------------------------
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users



--
<https://implementingquantlib.blogspot.com>
<https://twitter.com/lballabio>



--
<https://implementingquantlib.blogspot.com>
<https://twitter.com/lballabio>

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Getting Python bindings in QuantLib-SWIG-1.4 to work in OS X?

Richard Stanton
I'm afraid not. I eventually gave up. Has anyone got this to work on OS X 10.9?


From: "'luigi. com'" <[hidden email]>
Date: Monday, April 28, 2014 at 5:46 AM
To: Richard Stanton <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Subject: Re: [Quantlib-users] Getting Python bindings in QuantLib-SWIG-1.4 to work in OS X?

Richard,
    apologies for dropping the ball on this one. Did you have any success?

Luigi



On Thu, Apr 3, 2014 at 9:49 AM, Richard Stanton <[hidden email]> wrote:
I'll try it out. I assumed this was about getting QuantLib to install at all, and that worked fine on my machine, but maybe this is more about linking with other programs? I couldn't tell. However, the fact that the same installation strategy on another machine, running OS X 10.8.5, seemed to work fine, does suggest it's something Mavericks-specific.

Also, I think there may be a minor typo in those compilation flags – should it say –stdlib instead of –stlib? 

Oh, one more thing – if I set those flags for compiling QuantLib, does that also mean I need to recompile Boost? 

Thanks.

Richard

From: "'luigi. com'" <[hidden email]>
Date: Thursday, April 3, 2014 12:25 AM
To: Richard Stanton <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Subject: Re: [Quantlib-users] Getting Python bindings in QuantLib-SWIG-1.4 to work in OS X?

Not sure if it applies, but there's a note in <http://quantlib.org/install/macosx.shtml> about a few compilation flags needed in Mavericks. Do they help?

Luigi



On Tue, Apr 1, 2014 at 7:58 PM, Richard Stanton <[hidden email]> wrote:
I've compiled both QuantLib-1.4 and QuantLib-SWIG-1.4 (Python bindings) on
my Mac, but get errors when I try to run the Python test code. Has anyone
got this to work? Here are the details:

- Machine is running OS X 10.9.2, Xcode 5.1, and "gcc --version" reports

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix

   - Install Mac Ports boost 1.55.0 using "sudo port install boost"
   - Download and extract Quantlib-1.4
   - Following instructions at http://quantlib.org/install/macosx.shtml,
run

   ./configure --enable-static --with-boost-include=/opt/local/include/
--with-boost-lib=/opt/local/lib/ --prefix=/opt/local/

   make

   - Compilation completes fine. Running test suite, it tells me it's
running 567 test cases, and completes with no errors.

So far so good. Quantlib seems to be running fine. Now to install
quantlib-SWIG-1.4:

   - Download and extract
   - cd to Python subdirectory.
- After making sure the compiler/linker can find the ql header files and
libQuantLib.a, run "python setup.py build".
- Compiles and links (apparently) fine.
   - Now run "python setup.py test"

running test
running build
running build_py
running build_ext
Traceback (most recent call last):
  File "setup.py", line 239, in <module>
    'build_ext': my_build_ext
  File "/Users/stanton/anaconda/lib/python2.7/distutils/core.py", line
152, in setup
    dist.run_commands()
  File "/Users/stanton/anaconda/lib/python2.7/distutils/dist.py", line
953, in run_commands
    self.run_command(cmd)
  File "/Users/stanton/anaconda/lib/python2.7/distutils/dist.py", line
972, in run_command
    cmd_obj.run()
  File "setup.py", line 58, in run
    module = __import__('QuantLibTestSuite', globals(), locals(), [''])
  File "test/QuantLibTestSuite.py", line 22, in <module>
    from date import DateTest
  File "test/date.py", line 18, in <module>
    import QuantLib
  File "build/lib.macosx-10.5-x86_64-2.7/QuantLib/__init__.py", line 24,
in <module>
    from QuantLib import *
  File "build/lib.macosx-10.5-x86_64-2.7/QuantLib/QuantLib.py", line 28,
in <module>
    _QuantLib = swig_import_helper()
  File "build/lib.macosx-10.5-x86_64-2.7/QuantLib/QuantLib.py", line 24,
in swig_import_helper
    _mod = imp.load_module('_QuantLib', fp, pathname, description)
ImportError:
dlopen(build/lib.macosx-10.5-x86_64-2.7/QuantLib/_QuantLib.so, 2): Symbol
not found: __ZThn112_N8QuantLib19CappedFlooredCoupon6updateEv
  Referenced from: build/lib.macosx-10.5-x86_64-2.7/QuantLib/_QuantLib.so
  Expected in: dynamic lookup

Has anyone got this working on the same setup?

Thanks.

Richard Stanton


------------------------------------------------------------------------------
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users



--
<https://implementingquantlib.blogspot.com>
<https://twitter.com/lballabio>



--
<https://implementingquantlib.blogspot.com>
<https://twitter.com/lballabio>

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Getting Python bindings in QuantLib-SWIG-1.4 to work in OS X?

aborodya
In reply to this post by Richard Stanton
Just wanted to renew this thread - anybody made any progress? Any suggestions on what to look at?
Reply | Threaded
Open this post in threaded view
|

Re: Getting Python bindings in QuantLib-SWIG-1.4 to work in OS X?

Luigi Ballabio
No progress that I know of.  To begin with though, you might try
checking the SWIG mailing list to see if anyone has reported the same
problem on Mavericks with some other library (or if not, you can try
posting there and ask for suggestions).

Luigi


On Sun, Jun 8, 2014 at 3:54 PM, aborodya <[hidden email]> wrote:

> Just wanted to renew this thread - anybody made any progress? Any suggestions
> on what to look at?
>
>
>
> --
> View this message in context: http://quantlib.10058.n7.nabble.com/Getting-Python-bindings-in-QuantLib-SWIG-1-4-to-work-in-OS-X-tp15105p15414.html
> Sent from the quantlib-users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/NeoTech
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users



--
<https://implementingquantlib.blogspot.com>
<https://twitter.com/lballabio>

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://www.hpccsystems.com
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Getting Python bindings in QuantLib-SWIG-1.4 to work in OS X?

cottrell
In reply to this post by aborodya
I am also having this problem. Only interesting thing I have to report is that, at one time (a few years ago), I built up an older version successfully. I wish I had taken better notes.
Reply | Threaded
Open this post in threaded view
|

Re: Getting Python bindings in QuantLib-SWIG-1.4 to work in OS X?

wlrower
I'm having this exact same issue.  Did this get sorted some way?  I see postings from others that managed to install, so I assume there is a fix.  

Thanks,
Matt
Reply | Threaded
Open this post in threaded view
|

Re: Getting Python bindings in QuantLib-SWIG-1.4 to work in OS X?

randomAlpha
I recently cloned the master branch from github and everything worked fine for me on OS X 10.9 (before build you will need to run python setup.py wrap)
Reply | Threaded
Open this post in threaded view
|

Re: Getting Python bindings in QuantLib-SWIG-1.4 to work in OS X?

Luigi Ballabio
Hi,
    may you post the steps you used to compile the module, just to
check that you're all doing the same things?

Luigi

On Mon, Jul 28, 2014 at 9:24 PM, randomAlpha <[hidden email]> wrote:

> I recently cloned the master branch from github and everything worked fine
> for me on OS X 10.9 (before build you will need to run python setup.py wrap)
>
>
>
> --
> View this message in context: http://quantlib.10058.n7.nabble.com/Getting-Python-bindings-in-QuantLib-SWIG-1-4-to-work-in-OS-X-tp15105p15664.html
> Sent from the quantlib-users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Infragistics Professional
> Build stunning WinForms apps today!
> Reboot your WinForms applications with our WinForms controls.
> Build a bridge from your legacy apps to the future.
> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users



--
<https://implementingquantlib.blogspot.com>
<https://twitter.com/lballabio>

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls.
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Getting Python bindings in QuantLib-SWIG-1.4 to work in OS X?

aborodya
In reply to this post by Richard Stanton
Gentlemen, does anybody have any luck? Same problem described by Richard Stanton in the post from 04/01/2014 exists in version 1.5 :(  Any help would be greatly appreciated
Reply | Threaded
Open this post in threaded view
|

Re: Getting Python bindings in QuantLib-SWIG-1.4 to work in OS X?

Takehiro Yanagi
Hi,

I have it working using boost (from MacPorts) compiled with GCC g++ (also from MacPorts, not the system clang), QuantLib/QuantLib-SWIG from the master branch, both compiled with the same GCC g++.  OS10.10 and the latest Xcode.

Takehiro
Reply | Threaded
Open this post in threaded view
|

Re: Getting Python bindings in QuantLib-SWIG-1.4 to work in OS X?

alexs512
I have just hit the same issue.
I use XCode 6.2. el capitan (10.11).
boost from macports, as well as swig. i know its supposed to work without swig, but it did not.

interestingly enough I could make quantlib/python work couple of weeks ago and the only difference i remember was that i used xcode 7.2. but i have reinstalled my system since, so its impossible to tell.

the quantlib itself builds and seems to be working fine. its just the python interface that gives this 'symbol not found' error, which probably indicates a mismatch between linkers...

here is the full error:

Python 3.5.1 |Anaconda 4.0.0 (x86_64)| (default, Dec  7 2015, 11:24:55)
[GCC 4.2.1 (Apple Inc. build 5577)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import QuantLib
Traceback (most recent call last):
  File "/Users/alexeysimonov/dev/QuantLib/QuantLib-SWIG-1.8/Python/build/lib.macosx-10.5-x86_64-3.5/QuantLib/QuantLib.py", line 18, in swig_import_helper
    return importlib.import_module(mname)
  File "/Users/alexeysimonov/anaconda/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 577, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 903, in create_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
ImportError: dlopen(/Users/alexeysimonov/dev/QuantLib/QuantLib-SWIG-1.8/Python/build/lib.macosx-10.5-x86_64-3.5/QuantLib/_QuantLib.cpython-35m-darwin.so, 2): Symbol not found: __ZN8QuantLib10DateParser14parseFormattedERKSsS2_
  Referenced from: /Users/alexeysimonov/dev/QuantLib/QuantLib-SWIG-1.8/Python/build/lib.macosx-10.5-x86_64-3.5/QuantLib/_QuantLib.cpython-35m-darwin.so
  Expected in: flat namespace
 in /Users/alexeysimonov/dev/QuantLib/QuantLib-SWIG-1.8/Python/build/lib.macosx-10.5-x86_64-3.5/QuantLib/_QuantLib.cpython-35m-darwin.so

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/alexeysimonov/dev/QuantLib/QuantLib-SWIG-1.8/Python/build/lib.macosx-10.5-x86_64-3.5/QuantLib/__init__.py", line 21, in <module>
    from .QuantLib import *
  File "/Users/alexeysimonov/dev/QuantLib/QuantLib-SWIG-1.8/Python/build/lib.macosx-10.5-x86_64-3.5/QuantLib/QuantLib.py", line 21, in <module>
    _QuantLib = swig_import_helper()
  File "/Users/alexeysimonov/dev/QuantLib/QuantLib-SWIG-1.8/Python/build/lib.macosx-10.5-x86_64-3.5/QuantLib/QuantLib.py", line 20, in swig_import_helper
    return importlib.import_module('_QuantLib')
  File "/Users/alexeysimonov/anaconda/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_QuantLib'
>>>



any suggestions what to try?