You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cassandra.apache.org by Angelo Polo <la...@gmail.com> on 2021/05/26 13:30:40 UTC

4.0-rc1 from source - CqlshTest failure: Python driver not installed

Hey there,

When running bin/cqlsh or the test CqlshTest#testKeyspaceRequired, I'm
getting an error : "Python Cassandra driver not installed, or not on
PYTHONPATH." The suggestion to install the driver with pip is in the test
failure output (below), but is pre-installing the driver a new requirement
for using cqlsh? In earlier releases up through 4.0-beta4 the driver was
bundled. For example in 3.11.10
$ find . -name "*driver*"
./doc/source/getting_started/drivers.rst
./lib/cassandra-driver-core-3.0.1-shaded.jar
*./lib/cassandra-driver-internal-only-3.10.zip*
*./lib/cassandra-driver-internal-only-3.11.0-bb96859b.zip*
./lib/licenses/cassandra-driver-3.0.1.txt

Whereas 4.0-rc1 only has the Java jars.
$ find . -name "*driver*"
./doc/source/getting_started/drivers.rst
./build/lib/jars/cassandra-driver-core-3.11.0-shaded.jar
./build/dist/lib/cassandra-driver-core-3.11.0-shaded.jar
./lib/cassandra-driver-core-3.11.0-shaded.jar

Wasn't able to find mention of a new driver requirement here:
https://cassandra.apache.org/download/
https://cassandra.apache.org/doc/latest/getting_started/installing.html

Have I got some build misconfiguration or have requirements changed due to
the whole dependency bundling question that recently came up?

Thanks,
Angelo

####
Test output:

[junit-timeout] Testsuite: org.apache.cassandra.tools.cqlsh.CqlshTest Tests
run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 14.872 sec
[junit-timeout]
[junit-timeout] Testcase:
testKeyspaceRequired(org.apache.cassandra.tools.cqlsh.CqlshTest): FAILED
[junit-timeout]
[junit-timeout] Expected: a string containing "No keyspace has been
specified" ignoring case
[junit-timeout]      but: was "
[junit-timeout] Python Cassandra driver not installed, or not on PYTHONPATH.
[junit-timeout] You might try "pip install cassandra-driver".
[junit-timeout]
[junit-timeout] Python: /usr/local/bin/python3.7
[junit-timeout] Module load path:
['/wrkdirs/usr/ports/databases/cassandra4/work/apache-cassandra-4.0-rc1-src/bin/../lib/geomet-0.1.0.zip',
'/wrkdirs/usr/ports/databases/cassandra4/work/apache-cassandra-4.0-rc1-src/bin/../lib/six-1.12.0-py2.py3-none-any.zip',
'/wrkdirs/usr/ports/databases/cassandra4/work/apache-cassandra-4.0-rc1-src/bin/../lib/futures-2.1.6-py2.py3-none-any.zip',
'/wrkdirs/usr/ports/databases/cassandra4/work/apache-cassandra-4.0-rc1-src/bin',
'/usr/local/lib/python37.zip', '/usr/local/lib/python3.7',
'/usr/local/lib/python3.7/lib-dynload',
'/usr/local/lib/python3.7/site-packages']
[junit-timeout]
[junit-timeout] Error: No module named 'cassandra'
[junit-timeout]
[junit-timeout] "

Re: 4.0-rc1 from source - CqlshTest failure: Python driver not installed

Posted by Angelo Polo <la...@gmail.com>.
Thanks for the reply Brandon.
I've opened CASSANDRA-16700, but I'll leave it to others more familiar with
the driver versions to decide the exact dependency to set.

Best,
Angelo

On Wed, May 26, 2021 at 5:00 PM Brandon Williams <dr...@gmail.com> wrote:

> On Wed, May 26, 2021 at 9:05 AM Angelo Polo <la...@gmail.com>
> wrote:
> > But I take it that you're also not expecting that I would need to
> manually
> > install the python driver?
>
> I'm not, but I checked the rc1 source archive and indeed, the python
> driver never gets pulled in so cqlsh is not usable.
>
> > Also don't see the python driver as an explicit dependency in build.xml,
> > only as something not to delete in the "realclean" target. Should it have
> > been downloaded as a transitive dep of something else?
>
> It should have, but it looks like this is a bug as I just tried
> building rc2 and it has the same problem.  Can you please file a jira?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@cassandra.apache.org
> For additional commands, e-mail: dev-help@cassandra.apache.org
>
>

Re: 4.0-rc1 from source - CqlshTest failure: Python driver not installed

Posted by Brandon Williams <dr...@gmail.com>.
On Wed, May 26, 2021 at 9:05 AM Angelo Polo <la...@gmail.com> wrote:
> But I take it that you're also not expecting that I would need to manually
> install the python driver?

I'm not, but I checked the rc1 source archive and indeed, the python
driver never gets pulled in so cqlsh is not usable.

> Also don't see the python driver as an explicit dependency in build.xml,
> only as something not to delete in the "realclean" target. Should it have
> been downloaded as a transitive dep of something else?

It should have, but it looks like this is a bug as I just tried
building rc2 and it has the same problem.  Can you please file a jira?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cassandra.apache.org
For additional commands, e-mail: dev-help@cassandra.apache.org


Re: 4.0-rc1 from source - CqlshTest failure: Python driver not installed

Posted by Mick Semb Wever <mc...@apache.org>.
> But I take it that you're also not expecting that I would need to manually
> install the python driver?


Correct. You shouldn't be installing the driver to run the cqllib tests.


> Also don't see the python driver as an explicit dependency in build.xml,
> only as something not to delete in the "realclean" target. Should it have
> been downloaded as a transitive dep of something else?


It used to be listed in .build/build-resolver.xml
Because of CASSANDRA-16599 it is now in lib/ again.

While it is there under the tag in git, it is not found in the source
release artefact. The build script removes it when creating the
artefacts, see build.xml:1170.

We are still ironing out the wrinkles here, sorry. A lot of this was
done in a hurry for the last release, and a few fixes have followed on
from this change.

The ASF release policy has been reported to now be accurate. It states
that "A source release SHOULD not contain compiled code."

Presuming that python dependencies are not compiled, and it only says
SHOULD, it seems to make sense that we include the zip in the source
release artefact again. Although the same logic applies to all the jar
files, so it's a big IDK 🤷🏻‍♀️

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cassandra.apache.org
For additional commands, e-mail: dev-help@cassandra.apache.org


Re: 4.0-rc1 from source - CqlshTest failure: Python driver not installed

Posted by Angelo Polo <la...@gmail.com>.
Below I'd included a partial listing of the lib/ directory... build has
happened prior to attempting the tests or using cqlsh.
But I take it that you're also not expecting that I would need to manually
install the python driver?

Also don't see the python driver as an explicit dependency in build.xml,
only as something not to delete in the "realclean" target. Should it have
been downloaded as a transitive dep of something else?

Angelo


On Wed, May 26, 2021 at 3:49 PM Brandon Williams <dr...@gmail.com> wrote:

> The lib directory will be empty until you build, then it gets populated
> now.
>
> On Wed, May 26, 2021, 8:31 AM Angelo Polo <la...@gmail.com>
> wrote:
>
> > Hey there,
> >
> > When running bin/cqlsh or the test CqlshTest#testKeyspaceRequired, I'm
> > getting an error : "Python Cassandra driver not installed, or not on
> > PYTHONPATH." The suggestion to install the driver with pip is in the test
> > failure output (below), but is pre-installing the driver a new
> requirement
> > for using cqlsh? In earlier releases up through 4.0-beta4 the driver was
> > bundled. For example in 3.11.10
> > $ find . -name "*driver*"
> > ./doc/source/getting_started/drivers.rst
> > ./lib/cassandra-driver-core-3.0.1-shaded.jar
> > *./lib/cassandra-driver-internal-only-3.10.zip*
> > *./lib/cassandra-driver-internal-only-3.11.0-bb96859b.zip*
> > ./lib/licenses/cassandra-driver-3.0.1.txt
> >
> > Whereas 4.0-rc1 only has the Java jars.
> > $ find . -name "*driver*"
> > ./doc/source/getting_started/drivers.rst
> > ./build/lib/jars/cassandra-driver-core-3.11.0-shaded.jar
> > ./build/dist/lib/cassandra-driver-core-3.11.0-shaded.jar
> > ./lib/cassandra-driver-core-3.11.0-shaded.jar
> >
> > Wasn't able to find mention of a new driver requirement here:
> > https://cassandra.apache.org/download/
> > https://cassandra.apache.org/doc/latest/getting_started/installing.html
> >
> > Have I got some build misconfiguration or have requirements changed due
> to
> > the whole dependency bundling question that recently came up?
> >
> > Thanks,
> > Angelo
> >
> > ####
> > Test output:
> >
> > [junit-timeout] Testsuite: org.apache.cassandra.tools.cqlsh.CqlshTest
> Tests
> > run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 14.872 sec
> > [junit-timeout]
> > [junit-timeout] Testcase:
> > testKeyspaceRequired(org.apache.cassandra.tools.cqlsh.CqlshTest): FAILED
> > [junit-timeout]
> > [junit-timeout] Expected: a string containing "No keyspace has been
> > specified" ignoring case
> > [junit-timeout]      but: was "
> > [junit-timeout] Python Cassandra driver not installed, or not on
> > PYTHONPATH.
> > [junit-timeout] You might try "pip install cassandra-driver".
> > [junit-timeout]
> > [junit-timeout] Python: /usr/local/bin/python3.7
> > [junit-timeout] Module load path:
> >
> >
> ['/wrkdirs/usr/ports/databases/cassandra4/work/apache-cassandra-4.0-rc1-src/bin/../lib/geomet-0.1.0.zip',
> >
> >
> '/wrkdirs/usr/ports/databases/cassandra4/work/apache-cassandra-4.0-rc1-src/bin/../lib/six-1.12.0-py2.py3-none-any.zip',
> >
> >
> '/wrkdirs/usr/ports/databases/cassandra4/work/apache-cassandra-4.0-rc1-src/bin/../lib/futures-2.1.6-py2.py3-none-any.zip',
> >
> >
> '/wrkdirs/usr/ports/databases/cassandra4/work/apache-cassandra-4.0-rc1-src/bin',
> > '/usr/local/lib/python37.zip', '/usr/local/lib/python3.7',
> > '/usr/local/lib/python3.7/lib-dynload',
> > '/usr/local/lib/python3.7/site-packages']
> > [junit-timeout]
> > [junit-timeout] Error: No module named 'cassandra'
> > [junit-timeout]
> > [junit-timeout] "
> >
>

Re: 4.0-rc1 from source - CqlshTest failure: Python driver not installed

Posted by Brandon Williams <dr...@gmail.com>.
The lib directory will be empty until you build, then it gets populated now.

On Wed, May 26, 2021, 8:31 AM Angelo Polo <la...@gmail.com> wrote:

> Hey there,
>
> When running bin/cqlsh or the test CqlshTest#testKeyspaceRequired, I'm
> getting an error : "Python Cassandra driver not installed, or not on
> PYTHONPATH." The suggestion to install the driver with pip is in the test
> failure output (below), but is pre-installing the driver a new requirement
> for using cqlsh? In earlier releases up through 4.0-beta4 the driver was
> bundled. For example in 3.11.10
> $ find . -name "*driver*"
> ./doc/source/getting_started/drivers.rst
> ./lib/cassandra-driver-core-3.0.1-shaded.jar
> *./lib/cassandra-driver-internal-only-3.10.zip*
> *./lib/cassandra-driver-internal-only-3.11.0-bb96859b.zip*
> ./lib/licenses/cassandra-driver-3.0.1.txt
>
> Whereas 4.0-rc1 only has the Java jars.
> $ find . -name "*driver*"
> ./doc/source/getting_started/drivers.rst
> ./build/lib/jars/cassandra-driver-core-3.11.0-shaded.jar
> ./build/dist/lib/cassandra-driver-core-3.11.0-shaded.jar
> ./lib/cassandra-driver-core-3.11.0-shaded.jar
>
> Wasn't able to find mention of a new driver requirement here:
> https://cassandra.apache.org/download/
> https://cassandra.apache.org/doc/latest/getting_started/installing.html
>
> Have I got some build misconfiguration or have requirements changed due to
> the whole dependency bundling question that recently came up?
>
> Thanks,
> Angelo
>
> ####
> Test output:
>
> [junit-timeout] Testsuite: org.apache.cassandra.tools.cqlsh.CqlshTest Tests
> run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 14.872 sec
> [junit-timeout]
> [junit-timeout] Testcase:
> testKeyspaceRequired(org.apache.cassandra.tools.cqlsh.CqlshTest): FAILED
> [junit-timeout]
> [junit-timeout] Expected: a string containing "No keyspace has been
> specified" ignoring case
> [junit-timeout]      but: was "
> [junit-timeout] Python Cassandra driver not installed, or not on
> PYTHONPATH.
> [junit-timeout] You might try "pip install cassandra-driver".
> [junit-timeout]
> [junit-timeout] Python: /usr/local/bin/python3.7
> [junit-timeout] Module load path:
>
> ['/wrkdirs/usr/ports/databases/cassandra4/work/apache-cassandra-4.0-rc1-src/bin/../lib/geomet-0.1.0.zip',
>
> '/wrkdirs/usr/ports/databases/cassandra4/work/apache-cassandra-4.0-rc1-src/bin/../lib/six-1.12.0-py2.py3-none-any.zip',
>
> '/wrkdirs/usr/ports/databases/cassandra4/work/apache-cassandra-4.0-rc1-src/bin/../lib/futures-2.1.6-py2.py3-none-any.zip',
>
> '/wrkdirs/usr/ports/databases/cassandra4/work/apache-cassandra-4.0-rc1-src/bin',
> '/usr/local/lib/python37.zip', '/usr/local/lib/python3.7',
> '/usr/local/lib/python3.7/lib-dynload',
> '/usr/local/lib/python3.7/site-packages']
> [junit-timeout]
> [junit-timeout] Error: No module named 'cassandra'
> [junit-timeout]
> [junit-timeout] "
>