superset icon indicating copy to clipboard operation
superset copied to clipboard

Python package versions conflict when installing superset.

Open cxjbridge opened this issue 3 years ago • 3 comments

Hi, I have a confusing question:

After installing superset following the instructions on page(https://superset.apache.org/docs/installation/installing-superset-from-scratch/): pip install apache-superset

I initialized the db: superset db upgrade

it shows the message that we need cachelib>0.9.0: raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.ContextualVersionConflict: (cachelib 0.4.1 (/home/supersetvm/venv/lib/python3.8/site-packages), Requirement.parse('cachelib>=0.9.0'), {'flask-caching'})

So I updated the cachelib to 0.9.0: pip install cachelib==0.9.0

It shows the following message that apache-superset 2.0.0 need cachelib<0.5,>=0.4.1: Collecting cachelib==0.9.0 Using cached cachelib-0.9.0-py3-none-any.whl (15 kB) ERROR: apache-superset 2.0.0 has requirement cachelib<0.5,>=0.4.1, but you'll have cachelib 0.9.0 which is incompatible. Installing collected packages: cachelib Attempting uninstall: cachelib Found existing installation: cachelib 0.4.1 Uninstalling cachelib-0.4.1: Successfully uninstalled cachelib-0.4.1 Successfully installed cachelib-0.9.0

run superset db upgrade again: pkg_resources.DistributionNotFound: The 'cachelib<0.5,>=0.4.1' distribution was not found and is required by apache-superset

I am confused that Which version I should install for cachelib? apache-superset needs cache<0.5, >=0.4.1. Some other package needs cachelib>=0.9. Linux version: 5.15.0-46-generic #49~20.04.1-Ubuntu SMP Thu Aug 4 19:15:44 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

cxjbridge avatar Aug 13 '22 16:08 cxjbridge

Doesn't seem to matter what version you try to install. They all fail.

1.4.0 attempt:

ERROR: flask-appbuilder 3.4.5 has requirement Flask-WTF<0.15.0,>=0.14.2, but you'll have flask-wtf 1.0.1 which is incompatible. ERROR: flask-caching 2.0.1 has requirement cachelib>=0.9.0, but you'll have cachelib 0.1.1 which is incompatible.

The FlaskCaching:2.0.1 is a common denominator.

redwards101 avatar Aug 31 '22 03:08 redwards101

Still getting this. Is there a workaround?

pdxrlk avatar Sep 15 '22 11:09 pdxrlk

The easiest and most predictable workaround I know is use Docker. It's working for me. It looks like they're having a problem dealing with latest dependencies on Flask. That said, I tried the 'pip install' method again and I'm not getting the same error, in particular, Flask-Cache 2.0.1 causing problems. It now installs version 1.11.1, which fixes that problem. Now, however, another issue cropped up recently, 20942, for which there appears to be a solution.

redwards101 avatar Sep 15 '22 18:09 redwards101

Closing this as stale since it's been silent for so long, and we're trying to steer toward a more actionable Issues backlog. If people are still encountering this in current versions (currently 3.x) please open a new Issue or a PR to address the problem.

rusackas avatar Feb 12 '24 20:02 rusackas