is not working in Replit

^CTraceback (most recent call last):
  File "/home/runner/boilerplate-medical-data-visualizer/", line 13, in <module>
  File "/home/runner/boilerplate-medical-data-visualizer/venv/lib/python3.10/site-packages/matplotlib/", line 446, in show
    return _get_backend_mod().show(*args, **kwargs)
  File "/home/runner/boilerplate-medical-data-visualizer/venv/lib/python3.10/site-packages/matplotlib/", line 3620, in show
  File "/home/runner/boilerplate-medical-data-visualizer/venv/lib/python3.10/site-packages/matplotlib/backends/", line 523, in start_main_loop
  File "/nix/store/hd4cc9rh83j291r5539hkf6qd8lgiikb-python3-3.10.8/lib/python3.10/tkinter/", line 1458, in mainloop

I am working on this

For some reason, no plot will show up when trying to use seaborn. The entire thing just pauses forever, and you are forced to interrupt it in order to get back the Console prompt.


import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np

#df = pd.read_csv("medical_examination.csv")
#sns.countplot(data=df, x="cardio")

tips = sns.load_dataset("tips")

sns.scatterplot(x="total_bill", y="tip", data=tips)

All of thee packages were install in the virtual environment. There is no error loading them. But when this code runs, nothing happens. Basically plt will not plot, nor even open a plotting window.

The plot should show up in the “Output” window, but that never happens.

I tried this and it worked perfectly. It did update and install some dependencies automatically when I ran it.

It must be package/dependency related. Maybe try opening a new replit or installing packages manually again.

Can you link to your replit?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.