Sterncat / opticspy

python optics module
MIT License
458 stars 127 forks source link

ImportError: cannot import name 'iterable' from 'matplotlib.cbook' #45

Open Asohamithran opened 3 years ago

Asohamithran commented 3 years ago

Hi Sterncat I have installed opticspy using pip command after referring to issue #33 pip install git+git://github.com/Sterncat/opticspy.git@master The installation had no issues but when I import the module I get the following error:

Python 3.9.4 (default, Apr  9 2021, 16:34:09)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import opticspy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ashok/anaconda3/envs/opticspy/lib/python3.9/site-packages/opticspy/__init__.py", line 14, in <module>
    from . import phaseunwrap, lens, asphere, mplot3d, zernike_rec
  File "/home/ashok/anaconda3/envs/opticspy/lib/python3.9/site-packages/opticspy/mplot3d/__init__.py", line 6, in <module>
    from .axes3d import Axes3D
  File "/home/ashok/anaconda3/envs/opticspy/lib/python3.9/site-packages/opticspy/mplot3d/axes3d.py", line 34, in <module>
    from . import art3d
  File "/home/ashok/anaconda3/envs/opticspy/lib/python3.9/site-packages/opticspy/mplot3d/art3d.py", line 23, in <module>
    from matplotlib.cbook import iterable
ImportError: cannot import name 'iterable' from 'matplotlib.cbook' (/home/ashok/anaconda3/envs/opticspy/lib/python3.9/site-packages/matplotlib/cbook/__init__.py)

How should I proceed? Thanks

obsi2 commented 2 years ago

I had the same issue, downgrading matplotlib to 3.1.2 helped.