Skip to content

AttributeError: module 'pandas' has no attribute 'plotting' with tox #17520

Closed
@cachitas

Description

@cachitas

pandas 0.20.3 fails to import on every test when running tox.

  • tox packages installed, besides my package:

cycler==0.10.0, matplotlib==2.0.2, numexpr==2.6.2, numpy==1.13.1, pandas==0.20.3, py==1.4.34, pyparsing==2.2.0, pytest==3.2.2, pytest-travis-fold==1.2.0, python-dateutil==2.6.1, pytz==2017.2, scipy==0.19.1, six==1.10.0, tables==3.4.2

  • platform linux -- Python 3.5.2, pytest-3.2.2, py-1.4.34, pluggy-0.4.0

  • all tests fail with the following error:

myfile.py:16: in <module>
    import pandas as pd
.tox/3.5-nocov/lib/python3.5/site-packages/pandas/__init__.py:51: in <module>
    plot_params = pandas.plotting._style._Options(deprecated=True)
E   AttributeError: module 'pandas' has no attribute 'plotting'

Testing the same import in a virtualenv without tox works correctly.

Looks like it is a problem with pandas, but could also be something regarding tox (or even pytest). Hopefully, someone more experienced with tox can guide me here.

Output of pd.show_versions()

Taken from the virtualenv I created to test outside tox.

INSTALLED VERSIONS

commit: None
python: 3.6.2.final.0
python-bits: 64
OS: Linux
OS-release: 4.4.0-93-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: pt_PT.UTF-8

pandas: 0.20.3
pytest: 3.2.2
pip: 9.0.1
setuptools: 28.8.0
Cython: None
numpy: 1.13.1
scipy: 0.19.1
xarray: None
IPython: None
sphinx: 1.6.3
patsy: None
dateutil: 2.6.1
pytz: 2017.2
blosc: None
bottleneck: None
tables: 3.4.2
numexpr: 2.6.2
feather: None
matplotlib: 2.0.2
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.9.6
s3fs: None
pandas_gbq: None
pandas_datareader: None
None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions