It looks like easy_install is using python2.6 and installing cql in
the 2.6 packages directory: /usr/lib/python2.6/site-packages/

cqlsh is using the python executable for you environment (which looks
like 2.7) and thus is looking for cql in the site packages dir
(amongst others).

To quickly install the cql module explicitly for python 2.7 run:
python2.7 -m easy_install cql

Though you might also want to sort out your easy_install so it matches
the version of python that is used by default.

On 15 October 2014 11:48, Tim Dunphy <bluethu...@gmail.com> wrote:
> Hey all,
>
>  I'm using cassandra 2.1.0 on CentOS 6.5
>
>  And when I try to run cqlsh on the command line I get this error:
>
> root@beta-new:~] #cqlsh
>
> Python CQL driver not installed, or not on PYTHONPATH.
> You might try "easy_install cql".
>
> Python: /usr/local/bin/python
> Module load path: ['/usr/local/apache-cassandra-2.1.0/bin',
> '/usr/local/lib/python27.zip', '/usr/local/lib/python2.7',
> '/usr/local/lib/python2.7/plat-linux2', '/usr/local/lib/python2.7/lib-tk',
> '/usr/local/lib/python2.7/lib-old', '/usr/local/lib/python2.7/lib-dynload',
> '/root/.local/lib/python2.7/site-packages',
> '/usr/local/lib/python2.7/site-packages']
>
> Error: No module named cql
>
>
> I tried following the advice from the error and ran that command:
>
> [root@beta-new:~] #easy_install cql
> Searching for cql
> Best match: cql 1.4.0
> Processing cql-1.4.0-py2.6.egg
> cql 1.4.0 is already the active version in easy-install.pth
>
> Using /usr/lib/python2.6/site-packages/cql-1.4.0-py2.6.egg
> Processing dependencies for cql
> Finished processing dependencies for cql
>
> And that seems to go ok!
>
> However when I try to run it again:
>
> [root@beta-new:~] #cqlsh
>
> Python CQL driver not installed, or not on PYTHONPATH.
> You might try "easy_install cql".
>
> Python: /usr/local/bin/python
> Module load path: ['/usr/local/apache-cassandra-2.1.0/bin',
> '/usr/local/lib/python27.zip', '/usr/local/lib/python2.7',
> '/usr/local/lib/python2.7/plat-linux2', '/usr/local/lib/python2.7/lib-tk',
> '/usr/local/lib/python2.7/lib-old', '/usr/local/lib/python2.7/lib-dynload',
> '/root/.local/lib/python2.7/site-packages',
> '/usr/local/lib/python2.7/site-packages']
>
> Error: No module named cql
>
> I get the same exact error. How on earth do I break out of this feeback
> loop?
>
> Thanks!
> Tim
>
> --
> GPG me!!
>
> gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
>



-- 
Ben Bromhead

Instaclustr | www.instaclustr.com | @instaclustr | +61 415 936 359

Reply via email to