#๐Ÿ”’ PyCharm and matplotlib issues

44 messages ยท Page 1 of 1 (latest)

sharp parcel
#

I'm a TA for an intro computer science class and I have already marked for this class before. I used the original project files to set up a project over the summer and it worked fine. This time, when I try to use the same files to set up a new project, for some reason, matplotlib won't install and I can't figure out why.

I'm getting "error: failed-wheel-build-for-install" when I try to install matplotlib==3.6.0 using the PyCharm terminal. When I try to install via my Windows system terminal, I get "requirement already satisfied". When I use the pip list command in my project venv, it does not list matplotlib, but in my system terminal it shows I have matplotlib 3.10.3 installed. I've been searching online for a bit but haven't found anything yet that fixes the problem and allows me to install it as a package for this project. Any ideas?

silk otterBOT
#

@sharp parcel

Python help channel opened

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.

unique edge
#

its because venvs have their own pip libraries, so if you system has one, all your projects without the venv will have the library, but venv is a seperate enviorment with no libraries installed until you specifically install it inside of the venv folder

#

so if your venv was a folder called "MyPythonProject1" then in the terminal you would go into that directory, and then pip install it

#

tell me what happens if it still doesnt work @sharp parcel

dense mantle
#

Could your python version be very new? I'd expect matplotlib to have a binary install for most common platforms, but "wheel-build-for-install" suggests that it's building form source for yours.

errant galleon
#

Matplotlib 3.6.0 is somewhat old. There is no built wheel for it after Python 3.11 that I can find on PyPI

#

So with a newer version of Python itโ€™ll try to build from source

fathom cradle
#

oh, one more question what os and architecture are you running on?

sharp parcel
sharp parcel
sharp parcel
fathom cradle
sharp parcel
sharp parcel
fathom cradle
sharp parcel
#

3.13

#

I got the original code and unittests to run, so I'm guessing there was no specific reason for that version of matplotlib. Thanks for everyone's help!

unique edge
#

Thats why. Your python version is so new that it doesnt support the older version. Your only real option here is to install a compatible version, with pip install matplotlib

#

If you really want that version, you probably would need to download an older version of python.

sharp parcel
fathom cradle
# sharp parcel 3.13

good that you aren't on 3.14, it's a bit too early and many libraries doesn't have compiled binaries for it yet

sharp parcel
unique edge
#

If you DO want that version, I would recommend python 3.10. Latest one that works with 3.6.0

sharp parcel
#

I'll wait til the pie has finished baking though.

sharp parcel
fathom cradle
fathom cradle
sharp parcel
fathom cradle
#

i would guess over two years but probably less then four years beforeit is released, so probably yes, i sure hope you have a longer life expectancy than that

sharp parcel
#

Hahaha okay, I can wait that long

fathom cradle
sharp parcel
#

Oh wow, somebody's on top of it! Well thank you for that, I'm definitely not feeling that bold. Hahah

#

I think I will mark this as handled now. Thank you everyone!

dense mantle
#

Or of course just remove the version part entirely.

sharp parcel
dense mantle
#

You can stick comments in a requirements file.

# this used to be 3.6.0 but it has fallen out of build support
matplotlib

just to keep track. (If you even care.)

sharp parcel
#

Good call.

#

!solved

silk otterBOT
#
Python help channel closed with !close

This help channel has been closed. 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.