dash icon indicating copy to clipboard operation
dash copied to clipboard

[BUG] Fresh install broken?

Open javadan opened this issue 2 years ago • 10 comments

Describe your context

Fresh Raspbian install (Pi Zero W) Python 3.9

replace the result of pip list | grep dash below


dash                             2.6.1
dash-core-components             2.0.0
dash-html-components             2.0.0
dash-table                       5.0.0


Describe the bug

Fresh install, based on https://dash.plotly.com/installation
I save the first example "make your first Dash app!" to test.py


pip3 install dash

(python test.py)  - Error : Needs Pandas

pip3 install pandas

(python test.py)  - Error :   


File "pandas/_libs/interval.pyx", line 1, in init pandas._libs.interval
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 48 from C header, got 40 from PyObject


pip3 install --upgrade numpy

(python test.py)  - Error :   

  File "/home/pi/.local/lib/python3.9/site-packages/_plotly_utils/basevalidators.py", line 2424, in data_class
    module = import_module(self.module_str)
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 786, in exec_module
  File "<frozen importlib._bootstrap_external>", line 918, in get_code
  File "<frozen importlib._bootstrap_external>", line 587, in _compile_bytecode
ValueError: bad marshal data (unknown type code)

I give up.

Expected behavior

I expected the installation to go a bit smoother.

javadan avatar Aug 30 '22 17:08 javadan

Fresh Raspbian install (Pi Zero W)

This is an arm based machine, it needs specially compiled for packages that contains native code. You can try to use conda instead to install packages, that should have the pre-compiled packages for your system.

T4rk1n avatar Aug 30 '22 18:08 T4rk1n

Ok thanks. Pivoted to Flask/d3.js for now, but will give that a shot next Plotly/Dash attempt.

javadan avatar Aug 30 '22 18:08 javadan

Bummer. Last Conda for ARM6 was 2014. Python 2.

Do I have any other options?

javadan avatar Aug 31 '22 14:08 javadan

@javadan The platform you are looking for is aarch64, you can try this: https://repo.anaconda.com/miniconda/Miniconda3-py39_4.12.0-Linux-aarch64.sh

And all the miniconda distribution are located here: https://repo.anaconda.com/miniconda/

T4rk1n avatar Aug 31 '22 15:08 T4rk1n

The architecture name got merged back in 2014: https://www.phoronix.com/news/MTY5ODk

T4rk1n avatar Aug 31 '22 15:08 T4rk1n

Unfortunately that's for ARM8 (64 bit).
Pi Zero W is ARM6 (32 bit.)

pi

I doubt a 64 bit build will work.

Maybe it's possible to run a 64 bit OS on a 32 bit docker? Or compile from source?

javadan avatar Aug 31 '22 17:08 javadan

Yup.

javadan avatar Aug 31 '22 17:08 javadan

Unpacking payload ... ./Miniconda3-py39_4.12.0-Linux-aarch64.sh: 411: /home/pi/miniconda3/conda.exe: Exec format error

javadan avatar Aug 31 '22 17:08 javadan

Docker idea no go.

Possible to compile from source?

javadan avatar Aug 31 '22 17:08 javadan

Not sure what compiling packages with armv6 would involve, would probably takes a long time on a pi zero.

There was https://github.com/jjhelmus/berryconda, but seems that project has died.

T4rk1n avatar Aug 31 '22 17:08 T4rk1n