2017-09-18 22:31:22 +0100 | commented question | sage LD_LIBRARY_PATH @dan_fuela thank you, just tried, but that leads to the same results (either library not found, or libblas conflict) |

2017-09-18 14:14:52 +0100 | received badge | ● Student (source) |

2017-09-18 14:08:48 +0100 | asked a question | sage LD_LIBRARY_PATH I wrote a C++ library and the related python bindings, and I would like to make use of them from sage. But whatever I try, I cannot get sage to load the library. Here is what I tried: 1) FIRST ATTEMPT However, when I try to import from a jupyter notebook: I get the error: I only could find one reference (ticket 22006 on http://trac.sagemath.org - sorry, cannot post links yet) to a similar problem, however without resolution (the suggested workaround, namely to install 2) SECOND ATTEMPT But the library cannot be found this way: 3) THIRD ATTEMPT This results in the same import error as in SECOND ATTEMPT. 4) FOURTH ATTEMPT Now the library finally got loaded, but it cannot find its dependencies. THE QUESTION What is the proper way to make sage resolve a custom library and its dependencies? I understand that sage tries to isolate itself as much as possible from the system, and I have also read that there is some "magic" going on to adjust environment variables: this seems to cause the problem (1). ADDITIONAL INFO Working on Ubuntu 16.04 LTS with sage installed from ppa as follows: Note that everything works as expected when using the library from the system python console. |

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.