cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yinyin L (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Deleted] (CASSANDRA-6425) cqlsh cannot found cql driver when invoked through link
Date Sun, 01 Dec 2013 03:18:35 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-6425?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Yinyin L updated CASSANDRA-6425:
--------------------------------

    Comment: was deleted

(was: # Here is the patch I used to resolve this problem

diff --git a/bin/cqlsh b/bin/cqlsh
index acfb1f6..2c43a6f 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -66,9 +66,12 @@ except ImportError:
 CQL_LIB_PREFIX = 'cql-internal-only-'
 THRIFT_LIB_PREFIX = 'thrift-python-internal-only-'
 
+CASSANDRA_INSTALL_BASE = os.path.join(
+        os.path.dirname(os.path.realpath(__file__)), '..')
+
 # use bundled libs for python-cql and thrift, if available. if there
 # is a ../lib dir, use bundled libs there preferentially.
-ZIPLIB_DIRS = [os.path.join(os.path.dirname(__file__), '..', 'lib')]
+ZIPLIB_DIRS = [os.path.join(CASSANDRA_INSTALL_BASE, 'lib')]
 myplatform = platform.system()
 if myplatform == 'Linux':
     ZIPLIB_DIRS.append('/usr/share/cassandra/lib')
@@ -106,7 +109,7 @@ from cql.cqltypes import (cql_types, cql_typename, lookup_casstype, lookup_cqlty
 
 # cqlsh should run correctly when run out of a Cassandra source tree,
 # out of an unpacked Cassandra tarball, and after a proper package install.
-cqlshlibdir = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'pylib')
+cqlshlibdir = os.path.join(CASSANDRA_INSTALL_BASE, 'pylib')
 if os.path.isdir(cqlshlibdir):
     sys.path.insert(0, cqlshlibdir)
 
)

> cqlsh cannot found cql driver when invoked through link
> -------------------------------------------------------
>
>                 Key: CASSANDRA-6425
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6425
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>         Environment: Linux (ubuntu 12.04)
>            Reporter: Yinyin L
>             Fix For: 2.0.3
>
>         Attachments: CASSANDRA-6425_cqlsh.diff
>
>
> I have Cassandra installed in /opt/apache-cassandra-2.0.3 and have bin/cqlsh linked to
~/bin for easy access. However the following error message shows up on invoking through the
linked (ie: ~/bin/cqlsh):
> $ cqlsh 
> Python CQL driver not installed, or not on PYTHONPATH.
> You might try "easy_install cql".
> Python: /usr/bin/python
> Module load path: ['/opt/apache-cassandra-2.0.3/bin', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2',
'/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages']
> Error: No module named cql



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message