简体   繁体   中英

altair python package gives "Illegal instruction" on Raspberry PI

In my RaspberryPI ZERO WI got strange error when trying to import altair module in python script.

pi@raspberrypi:~ $ python3
Python 3.7.3 (default, Jul 25 2020, 13:03:44) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import altair
Illegal instruction

pi@raspberrypi:~ $ pip3 freeze
altair==4.2.0

Does anybody have an idea if there is a version, which works on RaspberryPi? Or any other idea why it is happening?

Illegal Instruction means that you are importing a C extension that is compiled incorrectly for the system you are using. Altair itself doesn't have any C extensions, but it depends on a number of libraries that do include C extensions, which you can see in its requirements.txt file :

entrypoints
jinja2
jsonschema>=3.0
numpy
pandas>=0.18
toolz

I would suggest trying to import each of these libraries to narrow-down which package is incorrectly installed, and then search for information on how to correctly install the problematic package on RaspberryPi ZERO.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM