Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot update python package on anaconda to latest version

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.

like image 726
guagay_wk Avatar asked Apr 25 '19 11:04

guagay_wk


People also ask

How do I update python 3.10 conda?

If you have Anaconda installed, you will have conda package manager. Using conda , create a new virtual environment with Python 3.10 as the Python version (but first check Python 3.10 is available on Anaconda). The command to do that is: >conda create -n Py310 python=3.10.

How do I install a specific version of python in Anaconda?

Or download the latest version of Anaconda and run the following command to install Python 3.5 (or 3.6) in the root environment: conda install python=3.5 or conda install python=3.6 . Or download the most recent Anaconda installer that included Python 3.5 (Anaconda 4.2. 0) or Python 3.6 (Anaconda 5.2. 0).


1 Answers

I was running through this problem myself.

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

  • Conda Forge
  • 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).

like image 97
lucasgcb Avatar answered Sep 28 '22 07:09

lucasgcb