Running on version 0.63 till 0.71 I get 'illegal instruction' error
See original GitHub issueSummary
Running streamlit version 0.63 > 0.71 returns ‘illegal instruction’. I suspect this may be down to my architecture and most people have not seen this yet. Here is what I see even asking for version number:
(streamlit) elementary@elementary:~/virtualenv/streamlit/project/streamlit$ streamlit --version
Illegal instruction
Steps to reproduce
The steps I took to reproduce on a vanilla Ubuntu 18.04 LTS (elementary OS 5.0 Juno).
- sudo apt update
- sudo apt install software-properties-common
- sudo add-apt-repository ppa:deadsnakes/ppa
- sudo apt install python3.7
- sudo apt install python3-pip
- pip3 install virtualenv
- pip3 install virtualenvwrapper
- mkdir virtualenv
- 16 pwd
- nano .bashrc (Update bashrc for shortcuts)
- source ~/.bashrc
- mkvirtualenv streamlit --python=/usr/bin/python3.7
- cd virtualenv/streamlit/
- mkdir streamlit
- cd streamlit/
- pip install streamlit
- streamlit --version
(streamlit) elementary@elementary:~/virtualenv/streamlit/project/streamlit$ streamlit --version
Illegal instruction
This happens for all versions of streamlit between 0.63 to 0.71 For version 0.62 things start to work again.
Expected behavior:
I would expect from this command to see the version of streamlit displayed. So for me when I downgrade to 0.62 I see the following - which shows me uninstalling and installing version .62:
(streamlit) ~/virtualenv/streamlit/project/streamlit$ streamlit --version
Illegal instruction
(streamlit) :~/virtualenv/streamlit/project/streamlit$ pip uninstall streamlit
Found existing installation: streamlit 0.63.0
Uninstalling streamlit-0.63.0:
Would remove:
/home/elementary/virtualenv/streamlit/bin/streamlit
/home/elementary/virtualenv/streamlit/bin/streamlit.cmd
/home/elementary/virtualenv/streamlit/lib/python3.7/site-packages/streamlit-0.63.0.dist-info/*
/home/elementary/virtualenv/streamlit/lib/python3.7/site-packages/streamlit/*
Proceed (y/n)? y
Successfully uninstalled streamlit-0.63.0
(streamlit) elementary@elementary:~/virtualenv/streamlit/project/streamlit$ pip install streamlit==0.62.0
Collecting streamlit==0.62.0
.....
.....
.....
Installing collected packages: streamlit
Successfully installed streamlit-0.62.0
WARNING: You are using pip version 20.2.4; however, version 20.3 is available.
You should consider upgrading via the '/home/elementary/virtualenv/streamlit/bin/python -m pip install --upgrade pip' command.
(streamlit) ~/virtualenv/streamlit/project/streamlit$ streamlit --version
Streamlit, version 0.62.0
Actual behavior:
This is a show stopper. Nothing works! I tried:
- streamlit --version
- streamlit hello
- streamlit run hello.py
(streamlit) elementary@elementary:~/virtualenv/streamlit/project/streamlit$ streamlit hello
Illegal instruction
Is this a regression?
Yes things worked in the past! 😦 …
Debug info
Streamlit version
(streamlit) elementary@elementary:~/virtualenv/streamlit/project/streamlit$ pip freeze
altair==4.1.0
argon2-cffi==20.1.0
astor==0.8.1
async-generator==1.10
attrs==20.3.0
backcall==0.2.0
base58==2.0.1
bleach==3.2.1
blinker==1.4
boto3==1.16.25
botocore==1.19.25
cachetools==4.1.1
certifi==2020.11.8
cffi==1.14.4
chardet==3.0.4
click==7.1.2
decorator==4.4.2
defusedxml==0.6.0
entrypoints==0.3
enum-compat==0.0.3
gitdb==4.0.5
GitPython==3.1.11
idna==2.10
importlib-metadata==3.1.0
ipykernel==5.3.4
ipython==7.19.0
ipython-genutils==0.2.0
ipywidgets==7.5.1
jedi==0.17.2
Jinja2==2.11.2
jmespath==0.10.0
jsonschema==3.2.0
jupyter-client==6.1.7
jupyter-core==4.7.0
jupyterlab-pygments==0.1.2
MarkupSafe==1.1.1
mistune==0.8.4
nbclient==0.5.1
nbconvert==6.0.7
nbformat==5.0.8
nest-asyncio==1.4.3
notebook==6.1.5
numpy==1.19.4
packaging==20.7
pandas==1.1.4
pandocfilters==1.4.3
parso==0.7.1
pathtools==0.1.2
pexpect==4.8.0
pickleshare==0.7.5
Pillow==8.0.1
prometheus-client==0.9.0
prompt-toolkit==3.0.8
protobuf==3.14.0
ptyprocess==0.6.0
pyarrow==2.0.0
pycparser==2.20
pydeck==0.5.0
Pygments==2.7.2
pyparsing==2.4.7
pyrsistent==0.17.3
python-dateutil==2.8.1
pytz==2020.4
pyzmq==20.0.0
requests==2.25.0
s3transfer==0.3.3
Send2Trash==1.5.0
six==1.15.0
smmap==3.0.4
streamlit==0.63.0
terminado==0.9.1
testpath==0.4.4
toml==0.10.2
toolz==0.11.1
tornado==5.1.1
traitlets==5.0.5
tzlocal==2.1
urllib3==1.26.2
validators==0.18.1
watchdog==0.10.4
wcwidth==0.2.5
webencodings==0.5.1
widgetsnbextension==3.5.1
zipp==3.4.0
Python version
(streamlit) elementary@elementary:~/virtualenv/streamlit/project/streamlit$ python --version
Python 3.7.9
(streamlit) elementary@elementary:~/virtualenv/streamlit/project/streamlit$ python
Python 3.7.9 (default, Aug 18 2020, 06:22:45)
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
Using virtualenv and virtualenvwrapper
OS version
Additional information
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Illegal instruction - Using Streamlit
Summary Running streamlit version 0.63 > 0.71 returns 'illegal instruction'. I suspect this may be down to my architecture and most people have....
Read more >I keep getting Illegal Instruction errors. What do I do?
Illegal Instruction errors occur when you try to run a program that was compiled with some processor-specific optimizations, ...
Read more >I get the illegal instruction error while running Matlab code on ...
I am trying to run a Matlab code using a slurm file on a HPC. While running the code I'm getting the following...
Read more >Fixing illegal instruction issues - ParabolaWiki
Sometimes, running a program results in a crash, and a message about illegal instruction(s). Here's an example from the bug report #2789:
Read more >Illegal instruction(core dumped) error on Jetson Nano
Generally speaking, an "illegal instruction" error tends to happen when attempting to run something compiled for 1 CPU architecture on a ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @nherriot
First of all, thank you very much for bringing this up both on GitHub and in the Discuss Forum, and sorry we didn’t get back sooner! I hope that we figure out a solution here. We have been unable to repro on our systems (both macOS and Ubuntu), so this will be a little tricky to identify the solution.
“Illegal Instruction” errors occur when you try to run a program that was compiled with some processor-specific optimizations, and is then running on a processor that fails to meet those requirements. This leads me to think that something we introduced either wasn’t compiled correctly for your processor or something strange happened on your system when combined with our changes caused issues.
Here are a few ideas to try:
pyenv
, since it looks like they’re installing theirs from a PPA (which I don’t trust 100%…). Also the PPA is for Ubuntu and their system is Elementary —which is based on Ubuntu, but may have some different libraries, which could be causing issues.From then on, all
pip
packages are actually compiled on the users’ machine so they should all work fine.As @randyzwitch pointed out, the marked change between 0.62 and 0.63 is the introduction of a new package called
pyarrow
. It’s possible (but perhaps a little shocking) that it caused the problem. We don’t import arrow when you runstreamlit --version
, so that shouldn’t crash. But in any case, you can try to install pyarrow from Conda and see if that fixes it. It’s a long shot, but worth a try.With regard to (2) I see this: https://issues.apache.org/jira/browse/ARROW-4272 for pyarrow, and it might be related to a tensorflow installation. It might be worthwhile to test TensorFlow similarly. Here’s an article that shares more on how tensorflow can be a problem and call the Illegal Instruction https://tech.amikelive.com/node-887/how-to-resolve-error-illegal-instruction-core-dumped-when-running-import-tensorflow-in-a-python-program/
All these ideas are educated guesses that I hope either yield fruitful results or at least more information to solve the problem. Let us know what you end up figuring out.
Hi Streamlit,
just to let you all know. By using pyenv to compile python for my particular server the issue was fixed. Just to note for anyone else who may be following this and has a similar problem if you see this type of thing after using pyenv to install python and setting up streamlit in your virtual environment:
I believe it means you have no ‘C’ header files installed for that application. You may see this type of warning when using pyenv to compile python for your system:
The safest way I found to fix is:
Hope this helps someone in the future! 😃