1

I'm working on a python project in PyCharm and am trying to import pandas:

import pandas as pd

When I try to run this I get a message in the console:

Process finished with exit code 132 (interrupted by signal 4: SIGILL)

I'm working in conda environment and within PyCharm project interpreter settings I can see that pandas is available: enter image description here

Why am I getting this message and how can I get around it? My script will not run without pandas and I cannot get past this message when trying to import.

Doug Fir
  • 19,971
  • 47
  • 169
  • 299
  • 1
    `ILL` means "illegal instruction", aka, you're running code compiled for a different CPU than your actual hardware (this can be something like code trying to use SSE4 instructions when you're on an Intel or AMD chip that only supports SSE2, f/e). Recompiling your copy of pandas locally is the obvious fix. – Charles Duffy Sep 29 '19 at 19:53
  • 1
    (Can also happen if there's a jump into something that's not actually code -- a bad function pointer, f/e -- but I wouldn't expect that here, pandas being written by competent people and widely used). – Charles Duffy Sep 29 '19 at 19:56
  • ...anyhow, to debug this, we'd need to know which platform you're on, exactly how you installed pandas (which is to say, exactly where the binaries were downloaded from), which CPU model and revision you're running, etc. – Charles Duffy Sep 29 '19 at 20:15
  • 1
    @CharlesDuffy I reinstalled using pip following answers over here and now it's working fine https://stackoverflow.com/questions/33669846/forcing-pip-to-recompile-a-previously-installed-package-numpy-after-switchin#41984963 Thanks for the pointer – Doug Fir Sep 29 '19 at 20:17
  • Excellent, glad to hear! Maybe add your own answer to that effect? (I don't think it's close enough to flag as duplicate). – Charles Duffy Sep 29 '19 at 20:18

1 Answers1

3

Following another SO question, I was able to overcome this by reinstalling pandas outside of conda with the following in the terminal:

pip install --user --force-reinstall --ignore-installed --no-binary :all: pandas

After that I was able to import pandas.

Doug Fir
  • 19,971
  • 47
  • 169
  • 299