-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
pandas tests fail when matplotlib is headless #18513
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
Comments
I’ve had the same issue. The fix I use is to import matplotlib before pandas, then do “matplotlib.use(‘agg’)”, then import pandas and run pd.test(). No idea how windows will affect things. |
@1kastner : I think the error message gives you a good way to check this: That being said, we should make sure that checking for The other thing is that you should try is to install X server if you haven't so already: https://askubuntu.com/questions/823352/windows-10-bash-cannot-connect-to-display |
But don't you think that this dependency is a bit strict? It is great that pandas can visualize something using matplotlib but for testing purposes I'd rather encapsulate it or make it skippable like the slow tests or the network tests. |
Are you still having this issue on master? Curious if it was resolved by #18427 |
It is solved now, thanks! |
Reproduce
Run pandas in a Windows Subsystem Linux and have matplotlib installed.
Problem description
Several tests fail with
_tkinter.TclError: no display name and no $DISPLAY environment variable
. Sometimes try/catch blocks are nested in a way that (most likely for the same reason) variables are not declared etc.Expected Output
Skip matplotlib tests or set up a functioning backend when issues with its setup are detected.
Output of
pd.show_versions()
INSTALLED VERSIONS
commit: 8a2176d
python: 3.6.3.final.0
python-bits: 64
OS: Linux
OS-release: 4.4.0-43-Microsoft
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.22.0.dev0+292.g8a2176d
pytest: 3.2.5
pip: 9.0.1
setuptools: 36.7.2
Cython: 0.27.3
numpy: 1.13.3
scipy: 1.0.0
pyarrow: None
xarray: None
IPython: 6.2.1
sphinx: 1.6.5
patsy: None
dateutil: 2.6.1
pytz: 2017.3
blosc: None
bottleneck: None
tables: 3.4.2
numexpr: 2.6.4
feather: None
matplotlib: 2.1.0
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: 0.999999999
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.9.6
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: