question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fails to install on Python 3.10 because of Numpy dependency

See original GitHub issue

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"
] 

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:7
  • Comments:9

github_iconTop GitHub Comments

6reactions
EMCPcommented, 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

4reactions
sranjeethcommented, Aug 14, 2022

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 #<if result = error then run below command> 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 #<else > export FLASK_APP=superset superset fab create-admin superset init superset run -p 8088 --with-threads --reload --debugger

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't install numpy on python 3.10
I managed to solve the problem by installing not the newest numpy 1.22. 2 in pip.
Read more >
Issues in installation in Python 3.10
Encountered error while trying to install package. ╰─> numpy ... pip subprocess to install build dependencies did not run successfully. │ exit code:...
Read more >
Installing NumPy
Install Python from python.org, Homebrew, or your Linux package manager. Use Poetry as the most well-maintained tool that provides a dependency resolver and ......
Read more >
Package installation issues | PyCharm Documentation
The package cannot be installed because the Python version doesn't satisfy the package requirement. Try to create another Python interpreter ...
Read more >
Error installing Pystan in python 3.10 with gcc 9.2.0
I am trying to install fbprophet in python. This has pystan 2.19.1.1 as a dependency. Running pip install pystan==2.19.1.1 gives me the following...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found