Repository navigation
pypi installation vs. dependencies #41902
|
Hi I'm using Superset using the pypi installation method. It makes it easier to add DB drivers and other dependencies. However, it seems that some workarounds are needed for it to work, which I wouldn’t need with the Docker method. As of 6.1.0, I needed to add these extra dependencies which I assume should live in the project's pyproject.toml. Additional entries required for 6.1.0: # Workaround for https://github.com/apache/superset/issues/40962
cachetools = ">=5.3.0,<7"
# Workaround for missing apache-superset dependency (didn't find an issue)
rich = "^15.0.0"
# Workaround for https://github.com/apache/superset/discussions/40172#discussioncomment-16980371
flask-sqlalchemy = "^2.5.1"It seems that I can't expect the dependencies in |
Replies: 2 comments
|
Hi @maederm! I'm Dosu and I'm helping the Apache Superset team. Your observation is correct — there is a real gap between Docker and PyPI installations. The root cause is that Docker builds install from Here's what's happening with your three workarounds:
To answer your questions:
To reply, just mention @dosu. Share context across your team and agents. Try Dosu. |
|
Your observation is correct: To achieve a reliable, deterministic PyPI installation identical to official release containers, you must use Superset's official constraints file. The Supported PyPI Installation MethodWhen installing from PyPI, supply the version-pinned constraints file maintained in the repository for that exact release tag: # Set your target version
export SUPERSET_VERSION=6.1.0
# Install using the release constraint file
pip install apache-superset==${SUPERSET_VERSION} \
-c https://raw.githubusercontent.com/apache/superset/${SUPERSET_VERSION}/requirements/base.txtWhy this is necessary
If you use
|
Your observation is correct:
pyproject.tomlandsetup.pyin Apache Superset specify loose dependency ranges to allow flexibility, but running an unconstrainedpip install apache-supersetwill resolve recent transient releases of sub-dependencies (likecachetools,rich, orflask-sqlalchemy) that break runtime contracts.To achieve a reliable, deterministic PyPI installation identical to official release containers, you must use Superset's official constraints file.
The Supported PyPI Installation Method
When installing from PyPI, supply the version-pinned constraints file maintained in the repository for that exact release tag: