Problem with matplotlib (anaconda) update - python

I'm having an issue with the version of my matplotlib. I don't understand why, since I downloaded and installed my new Ubuntu and anconda just last week.
I was getting an error in one of my notebooks in a legend settings, where I realized the my newly installed matplotlib version is 2.2.2. Although it was odd, I tried to update it using
$ conda update matplotlib
in the terminal which did basically nothing. So I tried the command
$ pip install --upgrade matplotlib
this one did update it to 3.1.1, but now I got the error that other packages (e.g. Pandas) were not installed.
I tried to fix that by going to the navigator directly and installing the packages I could think of one by one. It worked, but matplotlib was reverted back to 2.2.2.
To get out of this mess I uninstalled anaconda and reinstalled it again. Now matplotlib is still 2.2.2.
I would be grateful if anyone could tell me what the source of the problem is and/or how to solve it. Thanks a lot in advance! :)

Related

I did a pip install --user with anaconda prompt and now anaconda navigator will not work regardless of uninstalling and reinstalling

So i was trying to get spyder-notebook for spyder 5.2.2 and was having all sorts of issues getting the proper packages (end conclusion its impossible until spyder pushes and update). I went against the guidance I found on anaconda's site about using pip install --user (https://www.anaconda.com/blog/using-pip-in-a-conda-environment), however I figured worst case if a mess something up I can just uninstall and reinstall the program... But that turned out to be not true.
I've uninstalled and reinstalled anaconda navigator now 4 times, trying something new each time, but I keep getting the error shown below:
I've tried looking for guidance to resolve this issue, but cannot find anything helpful so far so any direction is appreciated.

Numerous issues when attempting to update Spyder to version 5.1.5 in new Anaconda install

I've run into numerous problems when attempting to update Spyder from 4.2.5 (which is what installs with the most recent Anaconda install) to 5.1.5 in Anaconda.
The advice provided on Spyder startup during version checking:
conda update conda
conda update anaconda
conda install spyder=5.1.5
does NOT work.
After some searching around, I did find a stack overflow question with an answer from a Spyder Maintainer with the following instructions:
conda remove spyder
conda remove python-language-server
conda update anaconda
conda install spyder=5.1.5
This seems to actually work, but then seemed to remove some common modules/packages as well, like matplotlib. Those are easy enough to reinstall (conda install matplotlib), but after that running matplotlib would cause Spyder to restart the Kernel every time, PLUS no plots were produced.
A different question provided the advice to downgrade the version of freetype from 2.11.0 to 2.10.4, which seemed to resolve that issue (downgrading Matplotlib seemed to be unnecessary). I'm afraid of what other issues I may encounter? I'm attempting to teach Python to 70 or so undergraduate students, and it's very difficult to assist when upgrades break things this bad.
Is there an easier/cleaner way to upgrade Spyder to 5.1.5 on Anaconda that I haven't come across yet?
(Spyder maintainer here) You said
Is there an easier/cleaner way to upgrade Spyder to 5.1.5 on Anaconda that I haven't come across yet?
Unfortunately, there isn't. This update was particularly hard because we had to drop some dependencies which became unmaintained and use others instead. However, the problem with Matplotlib crashing should be solved now (i.e. there's no need to downgrade freetype to fix it).
I'm attempting to teach Python to 70 or so undergraduate students, and it's very difficult to assist when upgrades break things this bad.
In that case, I strongly recommend you to use our Windows and macOS installers, which you can find here and follow our instructions on how to use other Python packages that don't come with them. I think that would be far more simpler for your students to follow than using Spyder directly through Anaconda.
(Sorry to be answering my own question, figured it's better for visibility)
So funny thing, as of 11/17/2021, I note that Anaconda's latest release now includes Spyder 5.1.5, so upgrade issues are no longer an problem if installing Anaconda fresh.
spyder 4.2.5 -> 5.1.5
spyder-kernels 1.10.2 -> 2.1.3
(https://docs.anaconda.com/anaconda/reference/release-notes/)
Yay for fortuitous upgrade releases!

Spyder version 5.1.5 issues

I had problems installing Spyder version 5.1.5. I followed all the steps outlined by #Carlos Cordoba which I have listed below:
conda remove spyder
conda remove python-language-server
conda update anaconda
conda install spyder=5.1.5
As soon as I did the above, my Anaconda installation was broken really badly. It is taking almost 8 hours to repair. If I had known, I should have remained with my jupyter notebooks but I decided to be adventurous with Spyder. Anyone knows any other fix for this?
You can try updating to Spyder 5.0.5 first then updating to 5.1.5 next. Maybe it might work. I managed to successfully update to 5.1.5 from 5.0.5 days ago without encountering any issues. Unfortunately, now that I have uninstalled and reinstalled Python and Anaconda in my newer laptop, even I too encountered this difficulty in updating to 5.1.5 straight from 4.2.5. Updating to Spyder 5.0.5 from 4.2.5 worked, but then updating to 5.1.5 didn't.

ModuleNotFound seaborn in Python 3

I'm trying to use the seaborn module in the Spyder IDE. I've installed seaborn (and sklearn) through pip install (pip install seaborn, pip3 install seaborn, pip -m install seaborn, conda install seaborn). I've also tried uninstalling it and installing it again. I see it in my pip list. But when I go into Spyder and actually try to import it using "import seaborn as sns", it says "mo module named 'seaborn'".
I've installed other modules (pandas, numpy, etc), so I'm pretty sure my PATH is set appropriately. I found another thread but it was all about starting virtual environments to work with seaborn, which I'd rather not do.
Any ideas? Please keep in mind that I'm fairly a newbie, so I have a basic IDE setup.
You may want to check whether the Spyder you are using is the correct one.
You can check this with which spyder from the commandline.
It should report Spyder being in the same directory as pip and python are.
Also, check if you can import Seaborn when you are in a normal Python terminal.
This will help tracking down what part of this operation is the issue.
Spyder also has a console of its own. Try pip install seaborn in that terminal. Hopefully it will solve your problem.

How to get rid of pygame 2.0.0.dev6?

i just installed python on my mac and i had also installed VS code with it. Later i tried installing pygame but it didn't work so i found another version that installed the version that is not stable, or pygame2.0.0.dev6 - i think that is have you type it. So that went succesfull, but after i found out why i was not being able to install the stable version, so now i want to get rid of pygame2.0.0.dev6 and install the stable version because in my VS code editor it keeps saying that it is using pygame2.0.0.dev6 even when i have the stable version installed.
Please all i want is to uninstall pygame2.0.0.dev6. I tried going to the documentation and i tried uninstalling from the terminal itself but i still cannot uninstall it. Help would me much appreciated. Thank you!
pip3 uninstall pygame==2.0.0.dev6
Windows users should use pip instead of pip3
Always use virtual environments. This version problem will be mitigated.

Categories