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.

Illegal hardware instruction (core dumped) when installing via conda-forge

See original GitHub issue

Issue: I get the error Illegal hardware instruction (core dumped) when installing from conda forge. Installing with pip is working fine. To reproduce build an environment with conda create -n test -c conda-forge python=3.7 lightfm, then activate conda activate test start a python interpreter and try to import lightfm

As an fyi, I also opened an issue on the feedstock: https://github.com/conda-forge/lightfm-feedstock/issues/7


Environment (conda list):
$ conda list
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       1_gnu    conda-forge
brotlipy                  0.7.0           py37h8f50634_1000    conda-forge
ca-certificates           2020.6.20            hecda079_0    conda-forge
certifi                   2020.6.20        py37hc8dfbb8_0    conda-forge
cffi                      1.14.3           py37h2b28604_0    conda-forge
chardet                   3.0.4           py37hc8dfbb8_1007    conda-forge
cryptography              3.1.1            py37hb09aad4_0    conda-forge
idna                      2.10               pyh9f0ad1d_0    conda-forge
ld_impl_linux-64          2.35                 h769bd43_9    conda-forge
libblas                   3.8.0               17_openblas    conda-forge
libcblas                  3.8.0               17_openblas    conda-forge
libffi                    3.2.1             he1b5a44_1007    conda-forge
libgcc-ng                 9.3.0               h24d8f2e_16    conda-forge
libgfortran-ng            7.5.0               hdf63c60_16    conda-forge
libgomp                   9.3.0               h24d8f2e_16    conda-forge
liblapack                 3.8.0               17_openblas    conda-forge
libopenblas               0.3.10          pthreads_hb3c22a3_4    conda-forge
libstdcxx-ng              9.3.0               hdf63c60_16    conda-forge
lightfm                   1.15            py37h161383b_1002    conda-forge
ncurses                   6.2                  he1b5a44_1    conda-forge
numpy                     1.19.1           py37h7ea13bd_2    conda-forge
openssl                   1.1.1h               h516909a_0    conda-forge
pip                       20.2.3                     py_0    conda-forge
pycparser                 2.20               pyh9f0ad1d_2    conda-forge
pyopenssl                 19.1.0                     py_1    conda-forge
pysocks                   1.7.1            py37hc8dfbb8_1    conda-forge
python                    3.7.8           h6f2ec95_1_cpython    conda-forge
python_abi                3.7                     1_cp37m    conda-forge
readline                  8.0                  he28a2e2_2    conda-forge
requests                  2.24.0             pyh9f0ad1d_0    conda-forge
scipy                     1.5.2            py37hb14ef9d_0    conda-forge
setuptools                49.6.0           py37hc8dfbb8_1    conda-forge
six                       1.15.0             pyh9f0ad1d_0    conda-forge
sqlite                    3.33.0               h4cf870e_0    conda-forge
tk                        8.6.10               hed695b0_0    conda-forge
urllib3                   1.25.10                    py_0    conda-forge
wheel                     0.35.1             pyh9f0ad1d_0    conda-forge
xz                        5.2.5                h516909a_1    conda-forge
zlib                      1.2.11            h516909a_1009    conda-forge


Details about conda and system ( conda info ):
$ conda info
    active environment : test3_persrec
    active env location : /home/simon/miniconda3/envs/test3_persrec
            shell level : 4
       user config file : /home/simon/.condarc
 populated config files : /home/simon/.condarc
          conda version : 4.8.4
    conda-build version : not installed
         python version : 3.7.6.final.0
       virtual packages : __glibc=2.27
       base environment : /home/simon/miniconda3  (writable)
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/simon/miniconda3/pkgs
                          /home/simon/.conda/pkgs
       envs directories : /home/simon/miniconda3/envs
                          /home/simon/.conda/envs
               platform : linux-64
             user-agent : conda/4.8.4 requests/2.24.0 CPython/3.7.6 Linux/5.4.0-48-generic linuxmint/19.3 glibc/2.27
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9

github_iconTop GitHub Comments

2reactions
tonyhammainencommented, Oct 30, 2020

fyi, my problem is not related to conda-forge, but figured I’d continue this thread since I suspect the root cause is the same.

I am getting the same error, Illegal instruction (core dumped), when trying to use LightFM().fit().

This happens if: Dockerfile:

RUN pip3 install lightfm==1.15
CMD python3 script_that_runs_lightfm.py

i.e. building the container on AWS CodeBuild and executing LightFM().fit() when the container is run on AWS ECS

However, if I move the the installation of lightfm to the runtime environment, i.e., Dockerfile: CMD pip3 install lightfm==1.15 && python3 script_that_runs_lightfm.py - everything works.

So, it seems like lightfm installation is very picky with regard to the installation environment (cpu?), never had any other library acting like this between AWS resources.

Any suggestions on how to avoid having to use this anti-pattern are welcome!

0reactions
SimonCWcommented, Dec 7, 2020

Im closing this since it was solved by: https://github.com/lyst/lightfm/pull/563, https://github.com/conda-forge/lightfm-feedstock/pull/9, and https://github.com/conda-forge/lightfm-feedstock/pull/11

Installing from conda-forge should work now (I had to do conda clean --all --force-pkgs-dirs but I think I had a few messed up intermediate versions in cache).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Illegal instruction (core dumped) for every installed packages ...
I am using linux aarch64 architecture. I install miniconda (Miniconda3-py37_4.9.2-Linux-aarch64.sh) in linux. The steps of installing the ...
Read more >
Illegal hardware instruction (core dumped) when installing via conda ...
Issue: I get the error Illegal hardware instruction (core dumped) when installing from conda forge. Installing with pip is working fine.
Read more >
Installation of Miniconda fails with illegal instruction - Ask Ubuntu
On executing bash (Miniconda installer) I am getting installing: python-3.6.5-hc3d631a_2 ... Miniconda3-4.5.4-Linux-x86.sh: line 355: 3886 ...
Read more >
Illegal instruction - Using Streamlit
I now see an error message coming from Streamlit which simply outputs: “Illegal instruction”. Has anyone seen this before.
Read more >
Python Conda Environments for Both arm64 and x86_64 on ...
This error is caused by installing tensorflow-macos on the wrong conda environment. Ensure you have installed tensoflow-macos on an arm64 conda environment.
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