apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform

Home Page:https://superset.apache.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fails to install on Python 3.10 because of Numpy dependency

dat-linux opened this issue · comments

How to reproduce the bug

python3.10 -m pip install apache-superset

Expected results

Correct install

Actual results

errors:
see screenshots

Screenshots

VirtualBox_DAT LInux_07_05_2022_14_31_38
VirtualBox_DAT LInux_07_05_2022_14_31_52

Environment

Ubuntu 22.04 with Python 3.10

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • [y ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • [y ] I have reproduced the issue with at least the latest released version of superset.
  • [ y] I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context

Not sure why numpy 1.19.4 is being targeted, when the main config file stipulates numpy=1.21.? There must be a conflicting internal dependency via another package during the build stage.

It's potentially pyarrow==5.0.0 causing the problem, as when try to pip install pyarrow=5.0.0 standalone the same problem arises.

This is conmfirmed by the project.toml for pyarrow=5.0.0:

[build-system]
requires = [
    "cython >= 0.29",
    "numpy==1.16.6; python_version<'3.9'",
    "numpy==1.19.4; python_version>='3.9'",
    "setuptools",
    "setuptools_scm",
    "wheel"
]

Recommendation

If possible, Superset's pyarrow dependency should be upgraded to 6.0.0:

[build-system]
requires = [
    "cython >= 0.29",
    "numpy==1.16.6; python_version<'3.9'",
    "numpy==1.19.4; python_version=='3.9'",
    "numpy==1.21.3; python_version>'3.9'",
    "setuptools",
    "setuptools_scm",
    "wheel"
] 

Same issue, same build, except my install was:
python3.10 -m pip install apache-superset

Same issue, same build, except my install was: python3.10 -m pip install apache-superset

You're right, corrected.

commented

The same here. Any workaround?

The same here. Any workaround?

I used pyenv to get 3.9 installed alongside 3.10 in DAT Linux.

apt-get install --yes libsqlite3-dev libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libgdbm-dev lzma lzma-dev tcl-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev wget curl make build-essential python3-openssl
git clone https://github.com/pyenv/pyenv.git $HOME/.pyenv
$HOME/.pyenv/bin/pyenv install 3.9.13

You then use

$HOME/.pyenv/versions/3.9.13/bin/python3 -m pip install ..

Or, create a venv using the above python path, then call that python executable when in the venv.

See code here for example: https://gitlab.com/datlinux/cari-plugin-superset/-/blob/main/lib/utils.bash

I was meaning to test installing Superset 2.0.0 again in a different environment to add more feedback to #20717, #20723, and #20199 (werkzeug module not found), but now I hit this issue on Arch Linux with Python 3.10.5.

hi, installing python 3.10 is not working so we have to downgrade python 3.9 and install it.

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.9
python3.9 --version
python3.9 -m venv venv
sudo apt-get install python3.9-venv
python3.9 -m venv venv
. venv/bin/activate
pip install apache-superset
sudo apt-get install build-essential libssl-dev libffi-dev python3.9-dev libsasl2-dev libldap2-dev
pip install apache-superset
superset db upgrade
#
export FLASK_APP=superset
sudo apt install redis-server
pip uninstall -y Werkzeug
pip install Werkzeug==2.0.3
superset db upgrade
superset --version
pip uninstall flask
pip install flask==2.1.3
superset db upgrade
superset fab create-admin
superset init
pip install pillow
superset init
superset run -p 8088 --with-threads --reload --debugger
#
export FLASK_APP=superset
superset fab create-admin
superset init
superset run -p 8088 --with-threads --reload --debugger

commented

IMO @betodealmeida this has been closed prematurely.. not everyone can downgrade to py3.9 easily and for now my workaround is I have to back off of using Ubuntu 22.04 in favor of 20.04 (which didn't work either so.. I will keep plugging away)

I see some packages got bumped by someone but.. pip installing latest I am still hitting the issue

EDIT: I guess this will come in a subsequent release like 2.0.x

commented

Did anyone found a solution apart from downgrading python? Can we reopen this?

Did anyone found a solution apart from downgrading python? Can we reopen this?

As far as I'm aware the problem remains for python 3.10. Hopefully addressed in next release of superset.

This still happens with 3.10

I am facing the same issue ,stuck for hours to find solution for this but did not find any thing.