Python Forum
Illegal instruction (core dumped) when import pandas.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Illegal instruction (core dumped) when import pandas.
#1
Hello!
I have Python 3.10.6 installed in my system (Lubuntu 22.04). I installed pandas and pyarrow with "pip3 install" command but when I try to import pandas in a .py file or even in the python3 console, like "import pandas as pd" or "import pandas" I get "Illegal instruction (core dumped)".

I tried to resintall pandas with pip and pip3 but I've got the same result:
amanda@amanda-rv415:~$ pip3 install pandas
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pandas in ./.local/lib/python3.10/site-packages (1.5.2)
Requirement already satisfied: numpy>=1.21.0 in ./.local/lib/python3.10/site-packages (from pandas) (1.24.1)
Requirement already satisfied: pytz>=2020.1 in ./.local/lib/python3.10/site-packages (from pandas) (2022.7)
Requirement already satisfied: python-dateutil>=2.8.1 in ./.local/lib/python3.10/site-packages (from pandas) (2.8.2)
Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.8.1->pandas) (1.16.0)
And python3:
amanda@amanda-rv415:~$ sudo apt-get install python3
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3 is already the newest version (3.10.6-1~22.04).
The following packages were automatically installed and are no longer required:
  libflashrom1 libftdi1-2
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
But nothing has changed. I would like to know how can I fix this problem. Thank you!
Reply
#2
Quote:I installed pandas and pyarrow with "pip3 install" command

It looks like it was already installed:

Quote:Requirement already satisfied: pandas in ./.local/lib/python3.10/site-packages (1.5.2)

Is it possible that someone copied pandas from another machine, or from another version of Python, into the site-packages directory first?

I would try:

  1. remove the existing version of pandas completely;
  2. reinstall a fresh copy;
  3. make sure that pip does not say the requirement is already satisfied;
  4. if it still fails, that might be a bug in pandas.

In which case, maybe you can get it to work by downgrading to the previous version.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  can not import anaconda pandas module. PySpark pandas module is imported!! aupres 0 724 Aug-06-2023, 01:09 AM
Last Post: aupres
  Plot a pandas data fram via pyqtgraph with an modul import and qt designer widget Nietzsche 0 858 May-29-2023, 02:42 PM
Last Post: Nietzsche
  ImportError: /home/ali/Documents/test/charm/core/crypto/AES.cpython-39-x86_64-linux-g Anldra12 0 1,240 Apr-28-2022, 07:13 AM
Last Post: Anldra12
  Illegal instruction? working code for months? korenron 4 13,126 Aug-05-2021, 09:57 AM
Last Post: korenron
  Segmentation fault (core dumped) hobbyist 1 10,525 Jun-07-2021, 12:56 PM
Last Post: supuflounder
  help on pandas circular import jip31 2 8,394 May-18-2021, 11:54 AM
Last Post: jip31
  Python script in Ubuntu core Nithin_Kumar 1 3,381 May-11-2021, 01:14 AM
Last Post: Skaperen
  Can't import pandas j_cooper9 1 2,013 Aug-02-2020, 08:31 PM
Last Post: Larz60+
  CSV import by Pandas maryam88 3 4,235 May-17-2020, 07:33 PM
Last Post: snippsat
  "Illegal variable name" message shown when trying to compile program thesurya7 2 2,628 Apr-19-2019, 08:13 AM
Last Post: thesurya7

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020