Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why matplotlib doesn't update in Anaconda to the 2.0 version

I was lately trying to update all my Anaconda packages:

conda update conda
conda update anaconda

Some of them still were not updated, so I also did conda update --all. Right now my conda version : 4.3.16, which seems to be the latest release. However, for some reason, matplotlib still has old version:

conda list
matplotlib                1.5.1               np111py35_0 

According to the Anaconda changelog, it should be updated to 2.0 version: matplotlib from 1.5.3 to 2.0.0. My installed python version is 3.5.2, if this matters.

UPD: Seems that spyder-app is blocking update because of problem with dependencies:

 conda install anaconda=4.3.1
UnsatisfiableError: The following specifications were found to be in conflict:
  - anaconda 4.3.1* -> spyder 3.1.2 py34_0
  - spyder-app -> spyder 2.3.3
Use "conda info <package>" to see the dependencies for each package.

conda install matplotlib=2
UnsatisfiableError: The following specifications were found to be in conflict:
 - matplotlib 2.0*
 - spyder-app -> spyder 2.3.0 -> pyqt 4.* -> qt >=4.8.6,<5.0
 - spyder-app -> spyder 2.3.0 -> pyqt 4.* -> sip >=4.16.4,<4.18
 Use "conda info <package>" to see the dependencies for each package.

UPD2: Problem was solved by removing spyder-app:

conda remove spyder-app
conda update anaconda

Matlotlib was updated to the 2.0 version, among other updated packages. I also checked if Spyder IDE still works, and it still is able to run.

like image 922
Antonio Avatar asked Apr 28 '17 12:04

Antonio


People also ask

Is Matplotlib already installed in Anaconda?

The Anaconda distribution of Python comes with Matplotlib pre-installed and no further installation steps are necessary.

Which version of Python does Anaconda use?

Anaconda supports Python 3.7, 3.8, 3.9 and 3.10.

How do I update my Anaconda by itself?

To update the Anaconda to a specific version, type the following command. The command conda update anaconda=VersionNumber grabs the specific release of the Anaconda metapackage; for example, conda update anaconda=2019.10.


1 Answers

It probably is a dependency conflict. The anaconda package is just a meta-package that bundles packages, if some package can't be updated because of a package you installed (maybe requiring matplotlib < 2, or even indirectly by requiring a package and version that matplotlib depends on) then you probably can't install the newest version of the anaconda package. You could try to install the newest anaconda package (currently 4.3.1) yourself:

conda install anaconda=4.3.1

But you can also try to install a specific version of matplotlib manually and see what happens (there should be an instructive message if it can't install it because of dependencies):

conda install matplotlib=2

In your case it's spyder-app that is responsible. It's a deprecated package and not included in newer versions of anaconda so one possibility is to remove it:

conda remove spyder-app

and then try the update of anaconda or matplotlib.

Another way would be to create a new environment and then you can choose which environment to use when:

conda install -n mynewenvironment python=3.5 anaconda

and then use the new environment when you need matplotlib 2 and the old environment if you need spyder-app (and don't care about the matplotlib version).

like image 62
MSeifert Avatar answered Sep 30 '22 17:09

MSeifert