You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Zao Liu <za...@gmail.com> on 2016/10/26 08:49:28 UTC

Import failure for use python cassandra-driver

Hi,

Suddenly I start to get this following errors when use python cassandra driver
3.7.0 in my macbook pro running OS X EI Capitan. Tries to reinstall the
package and all the dependencies, unfortunately no luck. I was able to run
it a few days earlier. Really can't recall what I changed could cause this.

  File "/Library/Python/2.7/site-packages/cassandra/cqlengine/connection.py",
line 20, in <module>
    from cassandra.cluster import Cluster, _NOT_SET, NoHostAvailable,
UserTypeDoesNotExist
ImportError: dlopen(/Library/Python/2.7/site-packages/cassandra/cluster.so,
2): Symbol not found: _PyException_Check
  Referenced from: /Library/Python/2.7/site-packages/cassandra/cluster.so
  Expected in: flat namespace
 in /Library/Python/2.7/site-packages/cassandra/cluster.so

Thanks,
Jason

Re: Import failure for use python cassandra-driver

Posted by Tyler Hobbs <ty...@datastax.com>.
This was fixed by the 3.7.1 release of the python driver:
https://groups.google.com/a/lists.datastax.com/forum/#!topic/python-driver-user/1UbvYc_h9KQ

On Wed, Oct 26, 2016 at 4:35 AM, Stefano Ortolani <os...@gmail.com>
wrote:

> Did you try the workaround they posted (aka, downgrading Cython)?
>
> Cheers,
> Stefano
>
> On Wed, Oct 26, 2016 at 10:01 AM, Zao Liu <za...@gmail.com> wrote:
> > Same happen to my ubuntu boxes.
> >
> >   File
> > "/home/jasonl/.pex/install/cassandra_driver-3.7.0-cp27-
> none-linux_x86_64.whl.ebfb31ab99650d53ad134e0b312c74
> 94296cdd2b/cassandra_driver-3.7.0-cp27-none-linux_x86_64.
> whl/cassandra/cqlengine/connection.py",
> > line 20, in <module>
> >
> >     from cassandra.cluster import Cluster, _NOT_SET, NoHostAvailable,
> > UserTypeDoesNotExist
> >
> > ImportError:
> > /home/jasonl/.pex/install/cassandra_driver-3.7.0-cp27-
> none-linux_x86_64.whl.ebfb31ab99650d53ad134e0b312c74
> 94296cdd2b/cassandra_driver-3.7.0-cp27-none-linux_x86_64.
> whl/cassandra/cluster.so:
> > undefined symbol: PyException_Check
> >
> >
> > And there is someone asked the same question in stack overflow:
> >
> > http://stackoverflow.com/questions/40251893/datastax-
> python-cassandra-driver-build-fails-on-ubuntu#
> >
> >
> >
> > On Wed, Oct 26, 2016 at 1:49 AM, Zao Liu <za...@gmail.com> wrote:
> >>
> >> Hi,
> >>
> >> Suddenly I start to get this following errors when use python cassandra
> >> driver 3.7.0 in my macbook pro running OS X EI Capitan. Tries to
> reinstall
> >> the package and all the dependencies, unfortunately no luck. I was able
> to
> >> run it a few days earlier. Really can't recall what I changed could
> cause
> >> this.
> >>
> >>   File
> >> "/Library/Python/2.7/site-packages/cassandra/cqlengine/connection.py",
> line
> >> 20, in <module>
> >>     from cassandra.cluster import Cluster, _NOT_SET, NoHostAvailable,
> >> UserTypeDoesNotExist
> >> ImportError:
> >> dlopen(/Library/Python/2.7/site-packages/cassandra/cluster.so, 2):
> Symbol
> >> not found: _PyException_Check
> >>   Referenced from: /Library/Python/2.7/site-
> packages/cassandra/cluster.so
> >>   Expected in: flat namespace
> >>  in /Library/Python/2.7/site-packages/cassandra/cluster.so
> >>
> >> Thanks,
> >> Jason
> >>
> >>
> >
>



-- 
Tyler Hobbs
DataStax <http://datastax.com/>

Re: Import failure for use python cassandra-driver

Posted by Stefano Ortolani <os...@gmail.com>.
Did you try the workaround they posted (aka, downgrading Cython)?

Cheers,
Stefano

On Wed, Oct 26, 2016 at 10:01 AM, Zao Liu <za...@gmail.com> wrote:
> Same happen to my ubuntu boxes.
>
>   File
> "/home/jasonl/.pex/install/cassandra_driver-3.7.0-cp27-none-linux_x86_64.whl.ebfb31ab99650d53ad134e0b312c7494296cdd2b/cassandra_driver-3.7.0-cp27-none-linux_x86_64.whl/cassandra/cqlengine/connection.py",
> line 20, in <module>
>
>     from cassandra.cluster import Cluster, _NOT_SET, NoHostAvailable,
> UserTypeDoesNotExist
>
> ImportError:
> /home/jasonl/.pex/install/cassandra_driver-3.7.0-cp27-none-linux_x86_64.whl.ebfb31ab99650d53ad134e0b312c7494296cdd2b/cassandra_driver-3.7.0-cp27-none-linux_x86_64.whl/cassandra/cluster.so:
> undefined symbol: PyException_Check
>
>
> And there is someone asked the same question in stack overflow:
>
> http://stackoverflow.com/questions/40251893/datastax-python-cassandra-driver-build-fails-on-ubuntu#
>
>
>
> On Wed, Oct 26, 2016 at 1:49 AM, Zao Liu <za...@gmail.com> wrote:
>>
>> Hi,
>>
>> Suddenly I start to get this following errors when use python cassandra
>> driver 3.7.0 in my macbook pro running OS X EI Capitan. Tries to reinstall
>> the package and all the dependencies, unfortunately no luck. I was able to
>> run it a few days earlier. Really can't recall what I changed could cause
>> this.
>>
>>   File
>> "/Library/Python/2.7/site-packages/cassandra/cqlengine/connection.py", line
>> 20, in <module>
>>     from cassandra.cluster import Cluster, _NOT_SET, NoHostAvailable,
>> UserTypeDoesNotExist
>> ImportError:
>> dlopen(/Library/Python/2.7/site-packages/cassandra/cluster.so, 2): Symbol
>> not found: _PyException_Check
>>   Referenced from: /Library/Python/2.7/site-packages/cassandra/cluster.so
>>   Expected in: flat namespace
>>  in /Library/Python/2.7/site-packages/cassandra/cluster.so
>>
>> Thanks,
>> Jason
>>
>>
>

Re: Import failure for use python cassandra-driver

Posted by Zao Liu <za...@gmail.com>.
Same happen to my ubuntu boxes.

  File "/home/jasonl/.pex/install/cassandra_driver-3.
7.0-cp27-none-linux_x86_64.whl.
ebfb31ab99650d53ad134e0b312c7494296cdd2b/cassandra_driver-3.
7.0-cp27-none-linux_x86_64.whl/cassandra/cqlengine/connection.py", line 20,
in <module>

    from cassandra.cluster import Cluster, _NOT_SET, NoHostAvailable,
UserTypeDoesNotExist

ImportError: /home/jasonl/.pex/install/cassandra_driver-3.
7.0-cp27-none-linux_x86_64.whl.
ebfb31ab99650d53ad134e0b312c7494296cdd2b/cassandra_driver-3.
7.0-cp27-none-linux_x86_64.whl/cassandra/cluster.so: undefined symbol:
PyException_Check


And there is someone asked the same question in stack overflow:

http://stackoverflow.com/questions/40251893/datastax-python-cassandra-driver-build-fails-on-ubuntu#



On Wed, Oct 26, 2016 at 1:49 AM, Zao Liu <za...@gmail.com> wrote:

> Hi,
>
> Suddenly I start to get this following errors when use python cassandra driver
> 3.7.0 in my macbook pro running OS X EI Capitan. Tries to reinstall the
> package and all the dependencies, unfortunately no luck. I was able to run
> it a few days earlier. Really can't recall what I changed could cause this.
>
>   File "/Library/Python/2.7/site-packages/cassandra/cqlengine/connection.py",
> line 20, in <module>
>     from cassandra.cluster import Cluster, _NOT_SET, NoHostAvailable,
> UserTypeDoesNotExist
> ImportError: dlopen(/Library/Python/2.7/site-packages/cassandra/cluster.so,
> 2): Symbol not found: _PyException_Check
>   Referenced from: /Library/Python/2.7/site-packages/cassandra/cluster.so
>   Expected in: flat namespace
>  in /Library/Python/2.7/site-packages/cassandra/cluster.so
>
> Thanks,
> Jason
>
>
>