question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Plotly 4.14.3 + Kaleido 0.2.0 - Import error on Linux

See original GitHub issue

Environment:

Operating system: RedHat Linux 7 Python version: 3.6.8

Error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/myuser/.local/lib/python3.6/site-packages/plotly/__init__.py", line 34, in <module>
    from plotly import (
  File "/home/myuser/.local/lib/python3.6/site-packages/plotly/io/__init__.py", line 5, in <module>
    from ._kaleido import to_image, write_image, full_figure_for_development
  File "/home/myuser/.local/lib/python3.6/site-packages/plotly/io/_kaleido.py", line 9, in <module>
    from kaleido.scopes.plotly import PlotlyScope
  File "/home/myuser/.local/lib/python3.6/site-packages/kaleido/scopes/plotly.py", line 3, in <module>
    import plotly.io as pio
AttributeError: module 'plotly' has no attribute 'io'

How to reproduce:

Install packages:

pip3 install kaleido==0.2.0
pip3 install plotly==4.14.3

Try to import plotly:

import plotly

Other interesting information:

The same combination of versions works fine on a Windows OS.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jonmmeasecommented, Mar 6, 2021

@boehmseb @Djeramon Please try the 0.2.1 release from the Kaleido GitHub release page (I’m going to wait to upload to PyPI and anaconda.org until something gives a 👍 that this fixed this issue for them)

For linux x86_64:

pip install https://github.com/plotly/Kaleido/releases/download/v0.2.1/kaleido-0.2.1-py2.py3-none-manylinux1_x86_64.whl

for other operating systems, look for the appropriate wheel file under https://github.com/plotly/Kaleido/releases/tag/v0.2.1, and pip install using the full url.

Thank!

1reaction
jonmmeasecommented, Mar 5, 2021

Thanks for the report.

Looks like an import cycle that for some reason Python 3.6 can’t resolve. Fix to kaleido on the way, but it may not be until tomorrow before the everthing churns through the release process. If you are hitting this problem, please continue to use version 0.1.0 until 0.2.1 is out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to export plotly images to png with Kaleido
I have installed plotly and kaleido and ran the code on python 3, but nothing happens. #Here is the code: import plotly.express as...
Read more >
kaleido - PyPI
Use Kaleido to export plotly.py figures as static images. Versions 4.9 and above of the Plotly Python library will automatically use kaleido for...
Read more >
plotlywidget | Yarn - Package Manager
Install with jupyter labextension install plotlywidget in JupyterLab, otherwise just install Plotly.py and it will automatically work in Classic Notebooks.
Read more >
Static image export hangs using kaleido? - Plotly Python
I want to get the static image using write_image method, but the program hangs. I have tried severvel method: 1) pio.kaleido.scope.mathjax ...
Read more >
List of supported software - EasyBuild documentation
The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI functionality ... Open Asset Import Library (assimp) is a library to import and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found