convexfi / riskparity.py

Fast and scalable construction of risk parity portfolios
https://mirca.github.io/riskparity.py/
MIT License
287 stars 65 forks source link

Cannot Import riskparityportfolio in Jupyter Notebook or Lab: Undefined Symbol error #14

Closed Sp3ctro closed 2 years ago

Sp3ctro commented 2 years ago

Problem description

Hi! I'm getting the following error when importing riskparityportfolio in Jupyter Notebooks or in Jupyter Lab.

ImportError: /home//riskparity.py/riskparityportfolio/vanilla.cpython-39-x86_64-linux-gnu.so: undefined symbol: _ZNSt15__exception_ptr13exception_ptr10_M_releaseEv

Screenshot from 2021-11-22 17-13-45

Example

import riskparityportfolio as rp

or

from riskparityportfolio import vanilla

...as was advised in another issue.

Expected behavior

I would expect riskparityportfolios to work in jupyter notebooks and in lab as it has done before. Oddly I have found in the past that if I make import riskparityportfolio as rp the first line in the notebook, it works. But this is no longer reliable (seems to no longer work). Using it in a script works fine.

Environment:

Thanks in advance for taking a look!

mirca commented 2 years ago

I'm closing this as I cannot reproduce the error. Please feel free to reopen in case you still face this issue.