Matplotlib can’t import to a django project

Problem description:
matplotlib con`t import to a django project

Expected behavior:

Actual behavior:

import matplotlib as plt
Traceback (most recent call last):
File “”, line 1, in
File “/home/runner/seestock/venv/lib/python3.8/site-packages/matplotlib/init.py”, line 113, in
from . import _api, _version, cbook, _docstring, rcsetup
File “/home/runner/seestock/venv/lib/python3.8/site-packages/matplotlib/rcsetup.py”, line 27, in
from matplotlib.colors import Colormap, is_color_like
File “/home/runner/seestock/venv/lib/python3.8/site-packages/matplotlib/colors.py”, line 56, in
from matplotlib import _api, _cm, cbook, scale
File “/home/runner/seestock/venv/lib/python3.8/site-packages/matplotlib/scale.py”, line 22, in
from matplotlib.ticker import (
File “/home/runner/seestock/venv/lib/python3.8/site-packages/matplotlib/ticker.py”, line 138, in
from matplotlib import transforms as mtransforms
File “/home/runner/seestock/venv/lib/python3.8/site-packages/matplotlib/transforms.py”, line 49, in
from matplotlib._path import (
ImportError: libstdc++.so.6: cannot open shared object file: No such file or directory

Steps to reproduce:

Bug appears at this link:

Browser/OS/Device:

Try adding pkgs.libstdcxx5 to your replit.nix file. If that does not work I found a related post on the nixos forums: What package provides libstdc++.so.6? - Help - NixOS Discourse

1 Like

Hey @feng54 welcome to the forums!

Thank you for your post and sorry that you are experiencing issues. However the Replit support team may not be able to help you with this issue if you do not complete the template fields fully.

Without knowing the expected behavior (screenshots are fine for this section) as well as the link to your Repl and the steps a member of the support team will need to follow to reproduce the error there won’t be much we can do to help you.

The more information you provide at the start, the easier it will be to identify if your bug report is an issue or a misunderstanding.

1 Like