5
votes

Some of my python packages on anaconda cannot be updated to the latest version.

For instance, beautifulsoup4 latest version on anaconda is v4.71 as seen in the release notes. https://docs.anaconda.com/anaconda/reference/release-notes/

However, when I run conda update beautifulsoup4, the latest version that I can update to is v4.6.

I discovered that the channel used by beautifulsoup4 is pypi.

# Name                    Version                   Build  Channel
beautifulsoup4            4.6.0                    pypi_0    pypi 
bleach                    3.1.0                      py_0    conda-forge

I suspect if I were to change the channel from pypi to conda-forge, I should be able to update to the latest version.

How can I change the channel from pypi to conda-forge? Or does the solution lies somewhere else?

I am using Windows 10 64-bit, python 3.7.

1
Could you update by pip in the conda cli?Parkofadown
Yes, but that is not the preferred way in anaconda. I was advised to use pip only when package not found in anaconda.user781486
What's architecture is your OS, 32 or 64 bit?lucasgcb
I remember I had the same issue with conda when something would update it wouldn't do it automatic, you maybe have to remove package and install by pip. Their may be an update package in the tabs at the top or update condaParkofadown

1 Answers

7
votes

I was running through this problem myself.

Let's take a look at versions in conda-forge and PyPi:

Both are actually up to date. So the problem here isn't as much the channels but conda mixing up the reference for the labels.

Update conda with

conda update

This will actually spew out a message telling you to run the command with a prefix for the proper path for your environment. Should be something like this:

conda update --prefix C:\Users\yourAccount\AppData\Local\Continuum\anaconda3 anaconda

Run that and it will update packages as well, including beautifulsoup4.

After this, you'll notice that creating new environment with just conda install beautifulsoup4 will return you the latest version.


Another curious thing to notice is that

enter image description here

There aren't distributions of 4.7 for Win-32 or Linux-32. So, if you are on either of those, updating conda won't help. You'll have to get the source code and build it yourself (if it is even possible).