I'm currently writing some code for the Pandas core and I'm wondering if my workflow is correct.
As the Travis CI instance tests against different versions of Python, I have conda set up to switch between the different versions locally so I can see if the test suite passes or fails.
But every time I switch between environments I get:
ERROR: Failure: ImportError (C extension: libpython2.6.so.1.0: cannot open shared object file: No such file or directory 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.)
and when I do python setup.py build_ext --inplace
I get:
/home/some_user/anaconda/lib/python2.7/site-packages/setuptools-17.1.1-py2.7.egg/setuptools/dist.py:294: UserWarning: The version specified ('0.16.2-134-g84d6eba') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.
running build_ext
skipping 'pandas/index.c' Cython extension (up-to-date)
skipping 'pandas/src/period.c' Cython extension (up-to-date)
skipping 'pandas/algos.c' Cython extension (up-to-date)
skipping 'pandas/lib.c' Cython extension (up-to-date)
skipping 'pandas/tslib.c' Cython extension (up-to-date)
skipping 'pandas/parser.c' Cython extension (up-to-date)
skipping 'pandas/hashtable.c' Cython extension (up-to-date)
skipping 'pandas/src/sparse.c' Cython extension (up-to-date)
skipping 'pandas/src/testing.c' Cython extension (up-to-date)
skipping 'pandas/msgpack.cpp' Cython extension (up-to-date)
So, as per @Jeff's comment to this question, I rebuild the extensions using:
python setup.py build_ext --inplace --force
And things work fine. But the build takes a good few minutes to run, and it feels like I'm doing something wrong. (It certainly doesn't mention having to force a rebuild in the Contributing to Pandas guide.
So am I doing something wrong, or is this just the way it works?