Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4816

Troubleshooting • Re: RPI 400 trouble installing or using matplotlib

$
0
0
I can not figure out how to use matplotlib on my new RPI400. It is supposed to be installed with Bookworm. I can see the module here:3.6.3 /usr/lib/python3/dist-packages/matplotlib/ but I am lost.
The whole thing with VENV has got me turned around. I performed the procedure with creating a separate environment but I dont think that was needed since matplotlib was already included build.

Does anyone have some advice for me? I just want to run some of the py programs that was included with the package. When I run them from Thonny I get all kinds of errors.

Sinc,
Ctk1122
Python venvs are never needed until they are because some software update breaks your stuff, or you break the system when you install your own stuff.

neilgl's post has what you need, it just missed the pip install for matplotlib for the venv created in those steps. Here are the same steps with that addition:

Code:

mkdir my_projectcd my_projectpython -m venv --system-site-packages envsource env/bin/activatepip install matplotlib
And it does not matter if it's already installed in the system, but installing your own, you isolate your code from system changes. The matplotlib in your venv will never change unless you explicitly change it on purpose.

Statistics: Posted by memjr — Tue Jan 16, 2024 10:18 pm



Viewing all articles
Browse latest Browse all 4816

Trending Articles