3

I'm trying to upgrade some systems to Cassandra 3.x. The installer wants Python(abi) >= 2.7, so I installed it. Still seeing this error:

Resolving Dependencies
--> Running transaction check
---> Package dsc30.noarch 0:3.0.1-1 will be installed
--> Processing Dependency: cassandra30 = 3.0.1 for package: dsc30-3.0.1-1.noarch
--> Processing Dependency: python(abi) >= 2.7 for package: dsc30-3.0.1-1.noarch
--> Running transaction check
---> Package cassandra30.noarch 0:3.0.1-1 will be installed
--> Processing Dependency: python(abi) >= 2.7 for package: cassandra30-3.0.1-1.noarch
---> Package dsc30.noarch 0:3.0.1-1 will be installed
--> Processing Dependency: python(abi) >= 2.7 for package: dsc30-3.0.1-1.noarch
--> Finished Dependency Resolution
Error: Package: dsc30-3.0.1-1.noarch (datastax)
       Requires: python(abi) >= 2.7
       Installed: python-2.6.6-64.el6.x86_64 (@base-local)
           python(abi) = 2.6
Error: Package: cassandra30-3.0.1-1.noarch (datastax)
       Requires: python(abi) >= 2.7
       Installed: python-2.6.6-64.el6.x86_64 (@base-local)
           python(abi) = 2.6
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest


# python -V
Python 2.7.11

Reading into this issue, it's apparently possible to break yum if python gets its version(s) mixed up. I'd rather not have to untangle that, so I'm hoping someone here can show me the proverbial light and explain how to get this bit installed.

CentOS 6.7


Edit:

I've installed python27 using the SCL repo. No change.

0

You may be able to use the python27 packages from the IUS project.

$ repoquery --whatprovides 'python(abi) = 2.7'
python27-0:2.7.11-1.ius.centos6.x86_64

This version of python installs in parallel with stock python, so yum and other system tools will continue to function like normal. You have to explicitly call python2.7 in order to use the newer version.

$ python -V
Python 2.6.6
$ python2 -V
Python 2.6.6
$ python2.6 -V
Python 2.6.6
$ python2.7 -V
Python 2.7.11
1

Using python 2.7 from SCL works for cassandra 3... as long as everything is set up correctly.

 # Install all of the necessary packages
$ yum install centos-release-SCL python27 cassandra30
 # Tell SCL about the normally installed python2.7 packages
$ echo "/usr/lib/python2.7/site-packages" | sudo tee /opt/rh/python27/root/usr/lib64/python2.7/site-packages/cqlshlib.pth
 # Set up a helpful alias for cqlsh to use the new python
$ echo 'cqlsh() { scl enable python27 "cqlsh $@"; }' | sudo tee /etc/profile.d/cqlsh.sh

Now you can use cqlsh as usual. Also, since python2.7 is installed with SCL you can get a shell with it enabled anytime with:

$ scl enable python27 bash

This should solve problems running cassandra 3.0.X and 3.X running on CentOS 6 where python 2.6 is required to keep yum 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.