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

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.

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).

Related

I have the correct spyder kernels installed but spyder complains that it is wrong

I have spyder 5.1.5 and spyder-kernels 2.1.3 installed as below (via conda, on Ubuntu 20.04):
# Name Version Build Channel
pyls-spyder 0.4.0 pyhd8ed1ab_0 conda-forge
spyder 5.1.5 py39h06a4308_1
spyder-kernels 2.1.3 py39h06a4308_0
in an environment. But when I launch spyder it prints an error message saying that my python environment or installation doesnt have the spyder-kernels module or the right version of it installed. For this enviroment I need python 3.9 for another package which is not available for python 3.10 and hence the reason why an older version.
I suspect this is because of another enviroment where I have the latest version of spyder installed with a newer kernel. However for the other environment I had to install spyder via pip because conda has not updated the spyder to the latest version and the former version has some bugs which really affect productivity (I have also tried other options such as installing spyder in its own environment and then linking it to the other enviroment that I am using it in but it created a whole bunch of other problems as severe as not being able to use the variable explorer and such). So I did really try before having to resort to this method. So in this enviroment spyder appears as
#
# Name Version Build Channel
pyls-spyder 0.4.0 pypi_0 pypi
spyder 5.2.2 pypi_0 pypi
spyder-kernels 2.2.1 py310hff52083_1 conda-forge
Why is the previous enviroment seeing the kernels in this enviroment? Is it because of the way I installed spyder here. Should I just completely remove this enviroment for the other to work properly or is there an easier way.
Note:
I also run into the same problem if I create an environment from scratch for spyder as follows: conda create -n spyder-env spyder -y
Update:
Ok, curiosity got the better of me, uninstall all my enviroments and reinstalling this enviroment worked but still dont exactly know why this occured. I will try reinstalling the other enviroments as they were and let you know if it breaks stuff again.

Packages eccodes, cartopy, pyproj and gdal do not update via conda

I'm trying to update my conda environment, but some packages (for example cartopy, eccodes, pyproj, gdal) fail to update. These old versions now lead to changes in the result of my code, so I want to have them updated.
Current versions of cartopy, eccodes, pyproj and gdal in my installation are:
# Name Version Build Channel
cartopy 0.17.0 py37hd759880_1006 conda-forge
eccodes 2.12.3 h4fa793d_1 conda-forge
pyproj 1.9.6 py37h516909a_1002 conda-forge
gdal 2.4.1 py37h5f563d9_10 conda-forge
libgdal 2.4.1 hc4f5fd6_10 conda-forge
Updating all packages using
conda update --all
does not update these packages and provides the message that all packages are updated. Also conda update cartopy (and similar for others) does not update these packages.
Probably there is an issue with a dependency on another package, but I can't see which packages are now preventing this update.
Anyone that can help in getting my Python installation up-to-date using conda?

How to upgrade to the latest Anaconda 5.0.1

I have Anaconda 4.4.0 (Windows, Python 3.6., 64 bit).
I would like to upgrade to latest Anaconda 5.0.1
Few options:
Download the full installer and run it
From existing installation (of 4.4.0) run "conda update --all"
From existing installation run "conda update anaconda"
What is the tradeoff among these options? What is the recommended one?
Download the full installer: Provided that you uninstall your existing Anaconda, this method will be least likely to cause upgrade problems. It will also probably be slower. Note that I think you should uninstall the old Anaconda so that you don't end up with two conda[.exe] files, two Anaconda Prompt shortcuts, and so forth. You may end up trying to install a package with the wrong conda and be very confused about what's happening.
conda update --all: This will update all of your packages in the environment to their latest version, regardless of their version in the Anaconda installer. This is not recommended because you will end up with package versions that are different from the ones in the Anaconda installer and you may end up with an error message about packages that are incompatible.
conda update anaconda: This will update the "metapackage" called anaconda to the latest version. This package has dependencies on specific versions of all of the packages and Anaconda (the company) give some assurance that these will all work together. So, updating the anaconda package will update all your packages to the version used in the latest version of the Anaconda installer.
My suggestion (based on some experience, I am not an employee of Anaconda) would be to try #3 and if it fails, try #1.

Updating package on Anaconda environment

Is there a way to update only the django package on the python 3 environment to version 2.0?
My base version of python is 2.7.14. Anaconda 4.4.4. I created a new environment for python 3.6.3.
I installed django 1.11.8 (as this is the latest version available for python 2.7) on both environments but I need django 2.0 on my python 3 environment.
When I try:
conda install django=2.0
PackagesNotFoundError: The following packages are not available from current channels:
django=2.0
Current channels:
https://repo.continuum.io/pkgs/main/win-64
https://repo.continuum.io/pkgs/main/noarch
... with a few more similar links
Am I missing something?
Is this even possible to do within an environment in the python 2 Anaconda?
Try this:
conda install django=2.0 -c conda-forge
That will use the conda-forge channel.

Anaconda - Not updating

I am using Anaconda installation and many times the updates don't work.
For example, some bokeh commands work well when I run the a python program from the command line (i.e c:> python testPlot.py), but will not work in the IPython console or from Spyder.
I tried updating conda, Anaconda, bokeh, but the behavior doesn't change. This is not just this one package. Others have the same issue.
Any idea?
Thanks.
C:>conda update conda
conda 4.0.6 py27_0
C:>conda update anaconda
anaconda 4.0.0 np110py27_0
C:>conda update bokeh
bokeh 0.11.1 py27_0
Just open a cmd prompt in Windows or Terminal on a mac and paste this with the version you are having trouble installing.
conda install anaconda-navigator=(whatever version is giving you trouble)

Categories

Resources