Skip to content

Plotly 5.13.1 introduces undeclared dependency to 'packaging' #4119

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

Closed
gabcarray opened this issue Mar 21, 2023 · 1 comment
Closed

Plotly 5.13.1 introduces undeclared dependency to 'packaging' #4119

gabcarray opened this issue Mar 21, 2023 · 1 comment

Comments

@gabcarray
Copy link

gabcarray commented Mar 21, 2023

Plotly 5.13.1 introduces a new dependency to the library 'packaging' without declaring it in environment.yml, which leads to crashes when running go.Figure.show(), unless packaging is installed externally.

This was discovered in python 3.8 in windows.

Snippet for reproduction:

pip install plotly==5.13.1
import plotly.graph_objects as go

def main():
    fig = go.Figure()
    fig.show()


if __name__ == "__main__":
    main()

Error message:

Traceback (most recent call last):
  File "CENSORED_PATH", line 9, in <module>
    main()
  File "CENSORED_PATH.py", line 5, in main
    fig.show()
  File "CENSORED_PATH\plotly\basedatatypes.py", line 3390, in show
    return pio.show(self, *args, **kwargs)
  File "CENSORED_PATH\_plotly_utils\importers.py", line 36, in __getattr__
    class_module = importlib.import_module(rel_module, parent_name)
  File "CENSORED_PATH\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "CENSORED_PATH\plotly\io\_renderers.py", line 7, in <module>
    from packaging.version import Version
ModuleNotFoundError: No module named 'packaging'
@AaronStiff
Copy link
Contributor

Hi @gabcarray. This is a known issue (see #4080) but will be patched in the next release as per #4113

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

2 participants