plotly / Kaleido

Fast static image export for web-based visualization libraries with zero dependencies
Other
363 stars 36 forks source link

ModuleNotFoundError: No module named 'kaleido.scopes'; 'kaleido' is not a package #97

Closed cpsievert closed 3 years ago

cpsievert commented 3 years ago

I've tried installing with both pip and conda and keep running into this same error

$ which python3                                                       
~/opt/anaconda3/bin/python3
$ cat ~/opt/anaconda3/lib/python3.8/site-packages/kaleido/_version.py                 
__version__ = "0.2.1"
$ python3
Python 3.8.8 (default, Apr 13 2021, 12:59:45) 
[Clang 10.0.0 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from kaleido.scopes.plotly import PlotlyScope
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/cpsievert/github/plotly/kaleido.py", line 1, in <module>
    from kaleido.scopes.plotly import PlotlyScope
ModuleNotFoundError: No module named 'kaleido.scopes'; 'kaleido' is not a package
$ ▶ conda list
# packages in environment at /Users/cpsievert/opt/anaconda3:
#
# Name                    Version                   Build  Channel
...
kaleido                   0.2.1                    pypi_0    pypi
...
alexcjohnson commented 3 years ago

File "/Users/cpsievert/github/plotly/kaleido.py"

Looks like it's trying to import that file as the Kaleido package - can you rename it to something that's not a package name?

cpsievert commented 3 years ago

Whoops, nice catch, thanks!