Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to install on Python 3.10 because of Numpy dependency #19986

Closed
dat-linux opened this issue May 7, 2022 · 11 comments · Fixed by #21002
Closed

Fails to install on Python 3.10 because of Numpy dependency #19986

dat-linux opened this issue May 7, 2022 · 11 comments · Fixed by #21002
Labels
#bug Bug report

Comments

@dat-linux
Copy link

dat-linux commented May 7, 2022

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"
] 
@dat-linux dat-linux added the #bug Bug report label May 7, 2022
@applebh
Copy link

applebh commented May 9, 2022

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

@dat-linux
Copy link
Author

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

You're right, corrected.

@MerNat
Copy link

MerNat commented Jun 1, 2022

The same here. Any workaround?

@dat-linux
Copy link
Author

dat-linux commented Jun 1, 2022

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

@alanorth
Copy link

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.

@sranjeeth
Copy link

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

@EMCP
Copy link

EMCP commented Sep 19, 2022

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

@sdezza
Copy link

sdezza commented Nov 11, 2022

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

@dat-linux
Copy link
Author

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.

@kant777
Copy link

kant777 commented Mar 17, 2023

This still happens with 3.10

@ramashish786
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants