[Scons-users] import pandas into SConstruct

Bill Deegan bill at baddogconsulting.com
Thu Mar 10 20:09:15 EST 2016


Just built a virtualenv with pandas and scons.
Get same stack trace.
Let me take a quick look and see if it's something simple.

-Bill

On Thu, Mar 10, 2016 at 7:49 PM, William Blevins <wblevins001 at gmail.com>
wrote:

> See inline.
>
> On Thu, Mar 10, 2016 at 10:39 PM, chris warth <cswarth at gmail.com> wrote:
>
>> I am having trouble importing the pandas package into an SConstruct file.
>> Can anyone confirm if this is real defect or just something in my
>> environment?
>>
>> Thanks for any help,
>>
>> - Chris
>>
>>
>> $ cat >scons.test
>>> import pandas as pd
>>> ^D
>>> $ scons -f scons.test
>>> scons: Reading SConscript files ...
>>> TypeError: Error when calling the metaclass bases
>>>     cannot create 'builtin_function_or_method' instances:
>>>   File "/path/explore/scons.test", line 1:
>>>     import pandas as pd
>>>   File
>>> "/path/venv/local/lib/python2.7/site-packages/pandas/__init__.py", line 48:
>>>     from pandas.io.api import *
>>>   File "/path/venv/local/lib/python2.7/site-packages/pandas/io/api.py",
>>> line 14:
>>>     from pandas.io.pickle import read_pickle, to_pickle
>>>   File
>>> "/path/venv/local/lib/python2.7/site-packages/pandas/io/pickle.py", line 1:
>>>     from pandas.compat import cPickle as pkl, pickle_compat as pc, PY3
>>>   File
>>> "/path/venv/local/lib/python2.7/site-packages/pandas/compat/pickle_compat.py",
>>> line 57:
>>>     class Unpickler(pkl.Unpickler):
>>>
>>
>
> This error isn't coming from SCons. This error is coming from trying to
> import from the pandas library. Right? Is the version of pandas installed
> setup for python3 rather than python2?
>
>
>> $ python --version
>>> Python 2.7.6
>>> $ scons --version
>>> SCons by Steven Knight et al.:
>>>         script: v2.4.1.rel_2.4.1:3453:73fefd3ea0b0, 2015/11/09 03:25:05,
>>> by bdbaddog on ubuntu1404-32bit
>>>         engine: v2.4.1.rel_2.4.1:3453:73fefd3ea0b0, 2015/11/09 03:25:05,
>>> by bdbaddog on ubuntu1404-32bit
>>>         engine path:
>>> ['/shared/silo_researcher/Matsen_F/MatsenGrp/working/cwarth/founder-inference-bakeoff/venv/lib/scons-2.4.1/SCons']
>>> Copyright (c) 2001 - 2015 The SCons Foundation
>>> $ python -c 'import pandas as pd; print pd.__version__'
>>> 0.17.1
>>
>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
>>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20160310/c43481ab/attachment.html>


More information about the Scons-users mailing list