VOOZH about

URL: https://qiita.com/kaizen_nagoya/items/cd857e2085e9974895a3

⇱ today's python error #Python - Qiita


👁 Image
0

Go to list of users who liked

0

Share on X(Twitter)

Share on Facebook

Add to Hatena Bookmark

More than 5 years have passed since last update.

@kaizen_nagoya(Dr. Kiyoshi Ogawa)

today's python error

0
Posted at
# python train.py
../common/trainer.py:7: UserWarning: 
This call to matplotlib.use() has no effect because the backend has already
been chosen; matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.

The backend was *originally* set to 'Qt5Agg' by the following code:
 File "train.py", line 5, in <module>
 import matplotlib.pyplot as plt
 File "/opt/conda/lib/python3.6/site-packages/matplotlib/pyplot.py", line 71, in <module>
 from matplotlib.backends import pylab_setup
 File "/opt/conda/lib/python3.6/site-packages/matplotlib/backends/__init__.py", line 16, in <module>
 line for line in traceback.format_stack()


 mpl.use('Agg')
Traceback (most recent call last):
 File "train.py", line 12, in <module>
 from ch07.peeky_seq2seq import PeekySeq2seq
 File "../ch07/peeky_seq2seq.py", line 5, in <module>
 from seq2seq import Seq2seq, Encoder
ModuleNotFoundError: No module named 'seq2seq'
# python visualize_attention.py 
Traceback (most recent call last):
 File "visualize_attention.py", line 60, in <module>
 visualize(attention_map, row_labels, column_labels)
 File "visualize_attention.py", line 26, in visualize
 fig, ax = plt.subplots()
 File "/opt/conda/lib/python3.6/site-packages/matplotlib/pyplot.py", line 1198, in subplots
 fig = figure(**fig_kw)
 File "/opt/conda/lib/python3.6/site-packages/matplotlib/pyplot.py", line 548, in figure
 **kwargs)
 File "/opt/conda/lib/python3.6/site-packages/matplotlib/backend_bases.py", line 161, in new_figure_manager
 return cls.new_figure_manager_given_figure(num, fig)
 File "/opt/conda/lib/python3.6/site-packages/matplotlib/backend_bases.py", line 167, in new_figure_manager_given_figure
 canvas = cls.FigureCanvas(figure)
 File "/opt/conda/lib/python3.6/site-packages/matplotlib/backends/backend_qt5agg.py", line 24, in __init__
 super(FigureCanvasQTAgg, self).__init__(figure=figure)
 File "/opt/conda/lib/python3.6/site-packages/matplotlib/backends/backend_qt5.py", line 234, in __init__
 _create_qApp()
 File "/opt/conda/lib/python3.6/site-packages/matplotlib/backends/backend_qt5.py", line 125, in _create_qApp
 raise RuntimeError('Invalid DISPLAY variable')
RuntimeError: Invalid DISPLAY variable
0

Go to list of users who liked

0
0

Go to list of comments

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0

Go to list of users who liked

0