Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to import kaleido when running (price / price.iloc[0]).vbt.plot().show_svg() in example PortfolioOptimization.ipynb #335

Closed
ljhust opened this issue Jan 17, 2022 · 5 comments

Comments

@ljhust
Copy link

ljhust commented Jan 17, 2022

When I running a PortfolioOptimization.ipynb example in colab, there was an error that occurred like below:

ValueError:
Image export using the "kaleido" engine requires the kaleido package,
which can be installed using pip:
$ pip install -U kaleido

@polakowo
Copy link
Owner

@ljhust, you must install kaleido explicitly, it's not included in the distribution. Or, you can specify `engine="orca"', see https://plotly.com/python/static-image-export/.

@andreas-vester
Copy link

If you simply pip install kaleido it will install version 0.2.1.post1 (as of 2022-01-17). From personal experience, I can tell that the simple fact that the version contains post1 can lead to errors with respect to package management.

If you encounter any difficulties, try to use the previous version, i.e. pip install kaleido==0.2.1.

@anhoa-vu
Copy link

Try to use .show() instead of .show_svg()

@Hoernchen
Copy link

win64/py310/kaleido 0.2.1: broken, show_svg() hangs forever - see plotly/Kaleido#126
solution:
pip install --upgrade "kaleido==0.1.*"
pip install nbformat <- runtime complaint because the old kaleido needs this

@eromoe
Copy link

eromoe commented Jan 12, 2023

It is super slow to running with vbt.plot().show_svg() , try with Hoernchen method works fine now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants