-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
AttributeError: module 'pandas' has no attribute 'plotting' with tox #17520
Comments
you cannot run tox with a production installation, you need to clone the project and build, see the contributing guide |
Sorry I can't see how that helps. I am not testing pandas itself. I am testing my own library with tox, where one of the dependencies is pandas. Previously, for |
Can you post a minimal tox.ini that reproduces this? |
I am testing in Python 3.5 and 3.6, all outputting the same errors. Here you have an example just with one case. [tox]
envlist =
clean,
3.5-nocov
; required by the docker image used
skipsdist = {env:TOXBUILD:false}
[testenv]
basepython =
{clean,check,report,codecov,docs,spell}: python3.5
usedevelop = true
setenv =
PYTHONPATH={toxinidir}/tests
PYTHONUNBUFFERED=yes
passenv =
*
deps =
pytest
pytest-travis-fold
commands =
{posargs:py.test -vv --ignore=mypackage}
[testenv:clean]
commands = coverage erase
skip_install = true
usedevelop = false
deps = coverage
[testenv:3.5-nocov]
basepython = {env:TOXPYTHON:python3.5} |
@cachitas that's not quite minimal. I meant something like
Along with # file: test_foo.py
import pandas
def test_bar():
pass Here's the output of
|
Apologies for not being so concise, but I wanted to illustrate my I already tested your example in my machine and it is working. So my next step was to build up step by step from that until I get the error reported, and it looks it comes from I have the following configuration in [tool:pytest]
norecursedirs =
.git
.tox
.env
dist
build
python_files =
test_*.py
*_test.py
tests.py
addopts =
-rxEfsw
--strict
--ignore=docs/conf.py
--ignore=setup.py
--ignore=.eggs
--doctest-modules
--doctest-glob=\*.rst
--tb=short After a quick test I found that the |
Ahh, yeah that issue has been an unanticipated headache of switching to pytest. I think there was a workaround where you add the change in https://github.com/pandas-dev/pandas/pull/16797/files to your conftest.py and pytest won't complain? Otherwise, the next release is in about 2 weeks, and things should work. |
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:
Testing the same import in a
virtualenv
withouttox
works correctly.Looks like it is a problem with
pandas
, but could also be something regardingtox
(or evenpytest
). Hopefully, someone more experienced withtox
can guide me here.Output of
pd.show_versions()
Taken from the
virtualenv
I created to test outsidetox
.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
The text was updated successfully, but these errors were encountered: