Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 573708 - pandas pyobject_cmp not built (system python with virtualenv)
Summary: pandas pyobject_cmp not built (system python with virtualenv)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-02 21:32 UTC by Grant Goodyear
Modified: 2017-07-07 14:09 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Grant Goodyear 2016-02-02 21:32:17 UTC
https://github.com/pydata/pandas/issues/10608

I get the "pyobject_cmp not built" error when trying to import pandas in a virtualenv using the system python 3.5, dev-lang/python-3.5.1-r2, (or system python 2.7: dev-lang/python-2.7.11-r2), but no system libraries.  I don't get this error if I use portage to build pandas, but reproducible science is a lot simpler using virtualenvs.  Strangely, if I build a local version of python-3.5.1 (just downloading the tarball and typing configure; make altinstall prefix=/home/grant/mypython3 exec-prefix=/home/grant/python3), then a virtualenv pointing to the local python can install and import pandas just fine.

Here's the log of the failing pandas import with the system python:

feynman ~ > mkvirtualenv --python=/usr/bin/python3.5 clean35
Running virtualenv with interpreter /usr/bin/python3.5
Using base prefix '/usr'
New python executable in clean35/bin/python3.5
Also creating executable in clean35/bin/python
Installing setuptools, pip, wheel...done.
(clean35)feynman ~ > rm ~/.cache/pip -rf
(clean35)feynman ~ > pip install -U pip setuptools wheel
Collecting pip
  Downloading pip-8.0.2-py2.py3-none-any.whl (1.2MB)
    100% |████████████████████████████████| 1.2MB 381kB/s 
Collecting setuptools
  Downloading setuptools-19.6.2-py2.py3-none-any.whl (472kB)
    100% |████████████████████████████████| 475kB 962kB/s 
Collecting wheel
  Downloading wheel-0.26.0-py2.py3-none-any.whl (63kB)
    100% |████████████████████████████████| 65kB 5.3MB/s 
Installing collected packages: pip, setuptools, wheel
  Found existing installation: pip 7.1.2
    Uninstalling pip-7.1.2:
      Successfully uninstalled pip-7.1.2
  Found existing installation: setuptools 18.2
    Uninstalling setuptools-18.2:
      Successfully uninstalled setuptools-18.2
  Found existing installation: wheel 0.24.0
    Uninstalling wheel-0.24.0:
      Successfully uninstalled wheel-0.24.0
Successfully installed pip-8.0.2 setuptools-19.6.2 wheel-0.26.0
(clean35)feynman ~ > pip install pandas
Collecting pandas
  Downloading pandas-0.17.1.tar.gz (6.7MB)
    100% |████████████████████████████████| 6.7MB 72kB/s 
Collecting python-dateutil>=2 (from pandas)
  Downloading python_dateutil-2.4.2-py2.py3-none-any.whl (188kB)
    100% |████████████████████████████████| 192kB 1.7MB/s 
Collecting pytz>=2011k (from pandas)
  Downloading pytz-2015.7-py2.py3-none-any.whl (476kB)
    100% |████████████████████████████████| 479kB 884kB/s 
Collecting numpy>=1.7.0 (from pandas)
  Downloading numpy-1.10.4.tar.gz (4.1MB)
    100% |████████████████████████████████| 4.1MB 102kB/s 
Collecting six>=1.5 (from python-dateutil>=2->pandas)
  Downloading six-1.10.0-py2.py3-none-any.whl
Building wheels for collected packages: pandas, numpy
  Running setup.py bdist_wheel for pandas ... done
  Stored in directory: /home/grant/.cache/pip/wheels/21/92/81/0259bc54d3f52003b6b94825569abf890237f20c2122a2af4f
  Running setup.py bdist_wheel for numpy ... done
  Stored in directory: /home/grant/.cache/pip/wheels/66/f5/d7/f6ddd78b61037fcb51a3e32c9cd276e292343cdd62d5384efd
Successfully built pandas numpy
Installing collected packages: six, python-dateutil, pytz, numpy, pandas
Successfully installed numpy-1.10.4 pandas-0.17.1 python-dateutil-2.4.2 pytz-2015.7 six-1.10.0
(clean35)feynman ~ > python
Python 3.5.1 (default, Feb  2 2016, 12:02:14) 
[GCC 5.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/home/grant/Envs/clean35/lib64/python35.zip', '/home/grant/Envs/clean35/lib64/python3.5', '/home/grant/Envs/clean35/lib64/python3.5/plat-linux', '/home/grant/Envs/clean35/lib64/python3.5/lib-dynload', '/usr/lib64/python3.5', '/usr/lib/python3.5', '/usr/lib/python3.5/plat-linux', '/home/grant/Envs/clean35/lib/python3.5/site-packages']
>>> import pandas as pd
Traceback (most recent call last):
  File "/home/grant/Envs/clean35/lib/python3.5/site-packages/pandas/__init__.py", line 7, in <module>
    from pandas import hashtable, tslib, lib
ImportError: /home/grant/Envs/clean35/lib/python3.5/site-packages/pandas/hashtable.cpython-35m-x86_64-linux-gnu.so: undefined symbol: pyobject_cmp

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/grant/Envs/clean35/lib/python3.5/site-packages/pandas/__init__.py", line 13, in <module>
    "extensions first.".format(module))
ImportError: C extension: /home/grant/Envs/clean35/lib/python3.5/site-packages/pandas/hashtable.cpython-35m-x86_64-linux-gnu.so: undefined symbol: pyobject_cmp not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext --inplace' to build the C extensions first.

If anybody has any ideas, I'd be grateful!

Thanks,
Grant
Comment 1 Justin Lecher (RETIRED) gentoo-dev 2016-02-08 09:59:50 UTC
Nothing we can do. Upstream is aware and suggests to use conda.
Comment 2 Grant Goodyear 2017-07-07 14:09:37 UTC
Fixed by upstream some time ago.