#๐ Can't install matplotlib
56 messages ยท Page 1 of 1 (latest)
@loud carbon
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Using venv, if that matters !(*๏ฟฃ(๏ฟฃใ*)
Python version: 3.13.0
Matplotlib version: 3.9.2
Output: https://paste.pythondiscord.com/KK3A
Ping if you reply, thank you
Could you try py -m pip install matplotlib
I can do python instead of py cause I'm on Windows
py is the windows launcher
Interesting. I'm guessing the py launcher wasn't included during the install
Can you verify that the venv is activated?
Not sure how to do that
but I used the VSCode Python extension to make an enviroment
So you may not have created and activated a venv then
Is this enough to be sure that it's activated
You need to run .\Scripts\activate
Oh wow okay
And now it should use that venv's python interpreter
Still same things with all 3 commands
Try pip installing meson first
In the venv?
Yup
Same thing still
Ok, might need to install Microsoft build tools
When you install a library through pip on Windows, sometimes you may encounter this error:
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
This means the library you're installing has code written in other languages and needs additional tools to install. To install these tools, follow the following steps: (Requires 6GB+ disk space)
1. Open https://visualstudio.microsoft.com/visual-cpp-build-tools/.
2. Click Download Build Tools >. A file named vs_BuildTools or vs_BuildTools.exe should start downloading. If no downloads start after a few seconds, click click here to retry.
3. Run the downloaded file. Click Continue to proceed.
4. Choose C++ build tools and press Install. You may need a reboot after the installation.
5. Try installing the library via pip again.
Weird, I think I did that with Rust already
but okay
I'll try that
I need to restart right
Meson was already available, afterall, it was printing error messages .
Right, but I thought a fresh install might help it's build issue
This looks a bit to me like the classical issue where the Python version (3.13) is too recent for certain PyPi packages to have proper support for it yet.
This especially happens with SciPy a and related packages a lot.
Looks like the only option is to downgrade to 3.12 then
Well, there you go.
Huh okay
How do I run commands with 3.12 without uninstalling 3.13
or I have to do that
Well since you are working with venvs, you can create a venv with 3.12
You'll either have to make sure 3.12 is in PATH when installing it, which will make it essentially your default version, or you'll have to specify the entire path to 3.12's interpreter executable when creating a venv.
Heyy it worked
However, in Windows, the default app to open .py files with may still be 3.13 unless you make sure it's not, which can lead to surprises if you forget you did this.
It just lets me do that
I don't know what context this is, but glad it works for you.
Looks like just selecting what interpreter to use in VS Code
(which isn't the same as creating and activating a venv)
That's what pops up after I try to create a venv
but either way, thank you, it works
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.