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.

Error on import, pandas incompatibility?

See original GitHub issue

Hello,

Today I noticed that I get an error when importing corner:

import corner

returns

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/mdecleir/opt/anaconda3/envs/astroconda/lib/python3.7/site-packages/corner/__init__.py", line 6, in <module>
    from .corner import corner
  File "/Users/mdecleir/opt/anaconda3/envs/astroconda/lib/python3.7/site-packages/corner/corner.py", line 12, in <module>
    from .arviz_corner import arviz_corner
  File "/Users/mdecleir/opt/anaconda3/envs/astroconda/lib/python3.7/site-packages/corner/arviz_corner.py", line 9, in <module>
    from arviz.data import convert_to_dataset
  File "/Users/mdecleir/opt/anaconda3/envs/astroconda/lib/python3.7/site-packages/arviz/__init__.py", line 32, in <module>
    from .data import *
  File "/Users/mdecleir/opt/anaconda3/envs/astroconda/lib/python3.7/site-packages/arviz/data/__init__.py", line 2, in <module>
    from .base import CoordSpec, DimSpec, dict_to_dataset, numpy_to_data_array
  File "/Users/mdecleir/opt/anaconda3/envs/astroconda/lib/python3.7/site-packages/arviz/data/base.py", line 10, in <module>
    import xarray as xr
  File "/Users/mdecleir/opt/anaconda3/envs/astroconda/lib/python3.7/site-packages/xarray/__init__.py", line 12, in <module>
    from .core.combine import concat, auto_combine
  File "/Users/mdecleir/opt/anaconda3/envs/astroconda/lib/python3.7/site-packages/xarray/core/combine.py", line 11, in <module>
    from .merge import merge
  File "/Users/mdecleir/opt/anaconda3/envs/astroconda/lib/python3.7/site-packages/xarray/core/merge.py", line 10, in <module>
    PANDAS_TYPES = (pd.Series, pd.DataFrame, pd.Panel)
  File "/Users/mdecleir/opt/anaconda3/envs/astroconda/lib/python3.7/site-packages/pandas/__init__.py", line 244, in __getattr__
    raise AttributeError(f"module 'pandas' has no attribute '{name}'")
AttributeError: module 'pandas' has no attribute 'Panel'

I did not see this error before, and I am wondering whether a recent update to pandas might cause this problem?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
mdecleircommented, Apr 6, 2021

I think pandas and arviz were up to date, but I saw xarray was updated from 11 to 17…

0reactions
OriolAbrilcommented, Apr 6, 2021

I haven’t seen any similar report on ArviZ side, which versions did you have installed originally @mdecleir? Do you know them?

Maybe it’s something we could have prevented with more strict version requirements in requirements.txt for arviz (or for xarray)

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to solve import error for pandas? - python - Stack Overflow
1 which is incompatible." However bumping it with: pip install --upgrade pandas --force. solved issue completely.
Read more >
BUG: can't import pandas · Issue #42506 - GitHub
This import error in the line from pandas.io.excel._base import ExcelFile, ExcelWriter, read_excel in /pandas/io/api.py is a real issue, ...
Read more >
1974326 – python-pandas is not working - Red Hat Bugzilla
How reproducible: Steps to Reproduce: 1. install python3-pandas 2. launch python (currently 3.9.5) 3. >>> import pandas as pd Actual results: ...
Read more >
pandas.errors.EmptyDataError — pandas 1.5.2 documentation
Exception raised in pd.read_csv when empty data or header is encountered. previous. pandas.errors.DuplicateLabelError.
Read more >
How to Fix ImportError: No module named pandas [Mac/Linux ...
To fix it, run pip install pandas in your Linux/MacOS/Windows terminal. ... However, it only throws the following import error: no module named...
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