Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Qiime2 error report couldn't connect to display & quot;localhost:12.0" how to solve it

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "qiime2 error couldn't connect to display "localhost:12.0"how to solve". In daily operation, I believe many people have doubts about how to solve the problem in qiime2 error couldn't connect to display "localhost:12.0". Xiaobian consulted all kinds of information and sorted out simple and easy operation methods. I hope to help you answer the doubts of "qiime2 error couldn't connect to display "localhost:12.0"how to solve"! Next, please follow the small series to learn together!

qiime2 couldn't connect to display "localhost:12.0"

Traceback (most recent call last): File "/share/work/biosoft/conda/Miniconda3.8/envs/qiime2-2020.8/lib/python3.6/site-packages/q2cli/commands.py", line 329, in __call__ results = action(**arguments) File "", line 2, in summarize File "/share/work/biosoft/conda/Miniconda3.8/envs/qiime2-2020.8/lib/python3.6/site-packages/qiime2/sdk/action.py", line 245, in bound_callable output_types, provenance) File "/share/work/biosoft/conda/Miniconda3.8/envs/qiime2-2020.8/lib/python3.6/site-packages/qiime2/sdk/action.py", line 452, in _callable_executor_ ret_val = self._ callable(output_dir=temp_dir, **view_args) File "/share/work/biosoft/conda/Miniconda3.8/envs/qiime2-2020.8/lib/python3.6/site-packages/q2_demux/_summarize/_visualizer.py", line 177, in summarize ax = sns.distplot(result, kde=False, color='black') File "/share/work/biosoft/conda/Miniconda3.8/envs/qiime2-2020.8/lib/python3.6/site-packages/seaborn/distributions.py", line 167, in distplot ax = plt.gca() File "/share/work/biosoft/conda/Miniconda3.8/envs/qiime2-2020.8/lib/python3.6/site-packages/matplotlib/pyplot.py", line 879, in gca return gcf().gca(**kwargs) File "/share/work/biosoft/conda/Miniconda3.8/envs/qiime2-2020.8/lib/python3.6/site-packages/matplotlib/pyplot.py", line 611, in gcf return figure() File "/share/work/biosoft/conda/Miniconda3.8/envs/qiime2-2020.8/lib/python3.6/site-packages/matplotlib/pyplot.py", line 546, in figure **kwargs) File "/share/work/biosoft/conda/Miniconda3.8/envs/qiime2-2020.8/lib/python3.6/site-packages/matplotlib/backend_bases.py", line 3358, in new_figure_manager return cls.new_figure_manager_given_figure(num, fig) File "/share/work/biosoft/conda/Miniconda3.8/envs/qiime2-2020.8/lib/python3.6/site-packages/matplotlib/backends/_backend_tk.py", line 888, in new_figure_manager_given_figure window = tk.Tk(className="matplotlib") File "/share/work/biosoft/conda/Miniconda3.8/envs/qiime2-2020.8/lib/python3.6/tkinter/__init__.py", line 2023, in __init__ self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)_tkinter.TclError: couldn't connect to display "localhost:12.0"Plugin error from demux: couldn't connect to display "localhost:10.0"Debug info has been saved to /tmp/qiime2-q2cli-err-cpq2ii3g.log

The problem is that you are using an interactive backend that tries to create a graphical window for you, but fails because you disconnected the x server that was available when you started the simulation.

[Solution]

Use a non-interactive backend (see Backend?) For example: Agg(for Png format, PDF, SVG or PS). In the script that generates the graph, simply call matplotlib.use() before import matplotlib.pyplot as plt, as follows:

Change Import to

import matplotlibmatplotlib.use ('AGG ')#or PDF, SVG or PSimport matplotlib.pyplot as plt

Permanent solutions:

mkdir -p $HOME/.config/matplotlib/ echo"backend: Agg" >> $HOME/.config/matplotlib/matplotlibrc At this point, the study of "qiime2 error couldn't connect to display "localhost:12.0"how to solve" is over, hoping to solve everyone's doubts. Theory and practice can better match to help you learn, go and try it! If you want to continue learning more relevant knowledge, please continue to pay attention to the website, Xiaobian will continue to strive to bring more practical articles for everyone!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report