Cannot update python package on anaconda to latest version

2024/10/11 2:27:37

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.

Answer

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

https://en.xdnf.cn/q/69826.html

Related Q&A

How does tensorflow.pad work?

There is the example of tensorflow.pad():# t = is [[1, 2, 3], [4, 5, 6]]. # paddings is [[1, 1,], [2, 2]]. # rank of t is 2.tf.pad(t, paddings, "CONSTANT") ==> [[0, 0, 0, 0, 0, 0, 0],[…

Installing PyPotrace on Windows 10

I would like to install Potrace on my Windows 10 Computer and I will be using it with python 2.7.5. I am following the installation instruction from this site.( https://pypi.python.org/pypi/pypotrace) …

dateutil 2.5.0 is the minimum required version

Im running the jupyter notebook (Enthought Canopy python distribution 2.7) on Mac OSX (v 10.13.6). When I try to import pandas (import pandas as pd), I am getting the complaint: ImportError: dateutil …

pytest fixture - get value and avoid error Fixture X called directly

I have updated pytest to 4.3.0 and now I need to rework test code since calling fixtures directly is deprecated. I have an issue with fixtures used in an unittest.TestCase, how do I get the value retur…

Django limit the number of requests per minute

Im trying to limit the number of requests from an IP in case I get too many requests from it. For example: if I will get more than 50 requests per minute I want to block that IP for 5 minutes. When I u…

How to add template variable in the filename of an EmailOperator task? (Airflow)

I cant seem to get this to work.I am trying to send daily a given file, whose name is like file_{{ds_nodash}}.csv.The problem is that I cant seem to add this name as the filename, since it seems it can…

Disadvantage of Python eggs?

Are there any disadvantages about using eggs through easy-install compared to the "traditional" packages/modules/libs?

Does Google App Engine Flex support Pipfile?

For App Engine Standard the explicitly state that they do not support Pipfiles and immediately block you from pushing your project if it contains a Pipfile. In searching the documentation, I dont see a…

Keras sees my GPU but doesnt use it when training a neural network

My GPU is not used by Keras/TensorFlow.To try to make my GPU working with tensorflow, I installed tensorflow-gpu via pip (I am using Anaconda on Windows)I have nvidia 1080tiprint(tf.test.is_gpu_availab…

Identify if there are two of the same character adjacent to eachother

Ive been asked to create a program that identifies if a password is valid or not. The one part I am struggling with is identifying whether there are two of the same character adjacent to each other. He…