1

I have been trying to install pandas for a week now. Read pretty much every thread I could find but nothing seems to work. I keep getting a ton of import and dpkg errors every time. Everything is up to date.

I have tried:

sudo apt-get install python-pandas

sudo apt install python3-pandas

Here is the output I get:

sudo apt-get install python-pandas
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python-pandas is already the newest version (0.19.2-5.1+rpi1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
44 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up python-functools32 (3.2.3.2-3) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-functools32 (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-numexpr (2.6.1-4) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-numexpr (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up gconf2 (3.2.6-4) ...
Traceback (most recent call last):
  File "/usr/bin/update-gconf-defaults", line 180, in <module>
    read_entries(realname)
  File "/usr/bin/update-gconf-defaults", line 139, in read_entries
    for line in file(filename):
NameError: name 'file' is not defined
dpkg: error processing package gconf2 (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-support (1.0.15) ...
  File "/usr/sbin/update-python-modules", line 52
    print x
          ^
SyntaxError: Missing parentheses in call to 'print'
dpkg: error processing package python-support (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-py (1.4.32-3) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-py (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-cvxopt (1.1.4-1.5+deb9u1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-cvxopt (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-joblib (0.10.3+git55-g660fe5d-1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-joblib (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-tz (2016.7-0.3) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-tz (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of libgnomevfs2-common:
 libgnomevfs2-common depends on gconf2 (>= 2.28.1-2); however:
  Package gconf2 is not configured yet.

dpkg: error processing package libgnomevfs2-common (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-pandas:
 python-pandas depends on python-tz; however:
  Package python-tz is not configured yet.

dpkg: error processing package python-pandas (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libgnomevfs2-extra:armhf:
 libgnomevfs2-extra:armhf depends on libgnomevfs2-common (= 1:2.24.4-6.1); however:
  Package libgnomevfs2-common is not configured yet.

dpkg: error processing package libgnomevfs2-extra:armhf (--configure):
 dependency problems - leaving unconfigured
Setting up python-jdcal (1.0-1.2~deb9u1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-jdcal (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python-matplotlib:
 python-matplotlib depends on python-tz; however:
  Package python-tz is not configured yet.
 python-matplotlib depends on python-functools32; however:
  Package python-functools32 is not configured yet.

dpkg: error processing package python-matplotlib (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gnome-schedule:
 gnome-schedule depends on python-support (>= 0.90.0); however:
  Package python-support is not configured yet.

dpkg: error processing package gnome-schedule (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-pytest:
 python-pytest depends on python-py (>= 1.4.29); however:
  Package python-py is not configured yet.

dpkg: error processing package python-pytest (--configure):
 dependency problems - leaving unconfigured
Setting up python-cycler (0.10.0-1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-cycler (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-dateutil (2.5.3-2) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-dateutil (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-gobject-2 (2.28.6-13) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-gobject-2 (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-imaging (4.0.0-4) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-imaging (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python-openpyxl:
 python-openpyxl depends on python-jdcal; however:
  Package python-jdcal is not configured yet.

dpkg: error processing package python-openpyxl (--configure):
 dependency problems - leaving unconfigured
Setting up python-xlrd (1.0.0-1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-xlrd (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-bs4 (4.5.3-1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-bs4 (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-lxml (3.7.1-1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-lxml (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-cairo (1.8.8-2.2) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-cairo (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-decorator (4.0.11-1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-decorator (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-antlr (2.7.7+dfsg-7) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-antlr (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python-tables:
 python-tables depends on python-numexpr; however:
  Package python-numexpr is not configured yet.

dpkg: error processing package python-tables (--configure):
 dependency problems - leaving unconfigured
Setting up python-subprocess32 (3.2.7-2) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-subprocess32 (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-nose (1.3.7-2) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-nose (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-patsy (0.4.1+git34-ga5b54c2-1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-patsy (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-webencodings (0.5-2) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-webencodings (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-pyparsing (2.1.10+dfsg1-1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-pyparsing (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python-gconf:
 python-gconf depends on python-gobject-2 (>= 2.17.0); however:
  Package python-gobject-2 is not configured yet.

dpkg: error processing package python-gconf (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libgnomevfs2-0:armhf:
 libgnomevfs2-0:armhf depends on libgnomevfs2-common (= 1:2.24.4-6.1); however:
  Package libgnomevfs2-common is not configured yet.

dpkg: error processing package libgnomevfs2-0:armhf (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libgnomeui-0:armhf:
 libgnomeui-0:armhf depends on libgnomevfs2-0 (>= 1:2.17.90); however:
  Package libgnomevfs2-0:armhf is not configured yet.

dpkg: error processing package libgnomeui-0:armhf (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-scipy:
 python-scipy depends on python-decorator; however:
  Package python-decorator is not configured yet.

dpkg: error processing package python-scipy (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-gnome2:
 python-gnome2 depends on libgnomeui-0 (>= 2.22.0); however:
  Package libgnomeui-0:armhf is not configured yet.
 python-gnome2 depends on libgnomevfs2-0 (>= 1:2.17.90); however:
  Package libgnomevfs2-0:armhf is not configured yet.
 python-gnome2 depends on python-gconf (= 2.28.1+dfsg-1.2); however:
  Package python-gconf is not configured yet.
 python-gnome2 depends on python-gobject-2 (>= 2.17.0); however:
  Package python-gobject-2 is not configured yet.

dpkg: error processing package python-gnome2 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-xlwt:
 python-xlwt depends on python-antlr; however:
  Package python-antlr is not configured yet.

dpkg: error processing package python-xlwt (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-gtk2:
 python-gtk2 depends on python-cairo (>= 1.0.2-1.1); however:
  Package python-cairo is not configured yet.
 python-gtk2 depends on python-gobject-2 (>= 2.21.3); however:
  Package python-gobject-2 is not configured yet.

dpkg: error processing package python-gtk2 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libgnome-2-0:armhf:
 libgnome-2-0:armhf depends on libgnomevfs2-0 (>= 1:2.17.90); however:
  Package libgnomevfs2-0:armhf is not configured yet.

dpkg: error processing package libgnome-2-0:armhf (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-glade2:
 python-glade2 depends on python-gtk2 (= 2.24.0-5.1); however:
  Package python-gtk2 is not configured yet.

dpkg: error processing package python-glade2 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-statsmodels:
 python-statsmodels depends on python-scipy; however:
  Package python-scipy is not configured yet.
 python-statsmodels depends on python-patsy; however:
  Package python-patsy is not configured yet.

dpkg: error processing package python-statsmodels (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-html5lib:
 python-html5lib depends on python-webencodings; however:
  Package python-webencodings is not configured yet.

dpkg: error processing package python-html5lib (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libbonoboui2-0:armhf:
 libbonoboui2-0:armhf depends on libgnome-2-0; however:
  Package libgnome-2-0:armhf is not configured yet.

dpkg: error processing package libbonoboui2-0:armhf (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.24-11+deb9u4) ...
Errors were encountered while processing:
 python-functools32
 python-numexpr
 gconf2
 python-support
 python-py
 python-cvxopt
 python-joblib
 python-tz
 libgnomevfs2-common
 python-pandas
 libgnomevfs2-extra:armhf
 python-jdcal
 python-matplotlib
 gnome-schedule
 python-pytest
 python-cycler
 python-dateutil
 python-gobject-2
 python-imaging
 python-openpyxl
 python-xlrd
 python-bs4
 python-lxml
 python-cairo
 python-decorator
 python-antlr
 python-tables
 python-subprocess32
 python-nose
 python-patsy
 python-webencodings
 python-pyparsing
 python-gconf
 libgnomevfs2-0:armhf
 libgnomeui-0:armhf
 python-scipy
 python-gnome2
 python-xlwt
 python-gtk2
 libgnome-2-0:armhf
 python-glade2
 python-statsmodels
 python-html5lib
 libbonoboui2-0:armhf
E: Sub-process /usr/bin/dpkg returned an error code (1)

I am really not sure what is happening here. I was able to install pandas on other systems 100's of times within a few seconds.

  • I just did sudo apt install python-pandas python3-pandas and it worked okay. Took about 5 minutes though. I suspect you have screwed up your packages by trying to install by non-standard means. – joan Sep 11 at 20:04
  • @user3088202, Ah, let me see. To get rid of dpkg errors, I usually use GUI Rpi Desktop > Preferences > Search to install. Just now I searched "pandas" with more than 20 results, some related to things I don't know, such as neuroscience and databases. I picked a couple of packages which I think are basic and installed without any problem. Of course I might later found dependency problems. My quick and dirty prototyping is install more and more dependent packages until no more dpkg errors coming up. – tlfong01 Sep 12 at 1:49
1

It may be that your package lists are broken. Because you don't mention you have done it, it is always a good idea to

rpi ~$ sudo apt update
rpi ~$ sudo apt full-upgrade
rpi ~$ sudo systemctl reboot

If it doesn't help you may try to reinitialize your package lists. How to do it you can look at Raspberry Pi sudo apt-get update not working.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.