No appropriate Python interpreter found Cassandra Python 3.1,3.4 - python-3.x

I've installed Cassandra 3.9 on Centos 6.7 which has Python 3.1.1 installed at /usr/local/bin/python.
When I try to start the cql shell, it says no appropriate python interpreter found. I tried installing python 3.4 and alias it. but that gives the same error.
I have a few questions on this.
what are the compatible Python versions that Cassandra 3.9 supports?
How do I change the Python version permanently from the existing version which is mounted on a read-only file system(which python) to the version I install now?(using cshell)
I echo'd the pyver variable being used. It says 2.7 which should be compatible with Cassandra 3.9 but still gives an error.

Related

Maintaining different python versions for virtual environments

I have 2 different versions of python. 1 is always used with my anaconda and it is 3.9.7.
For the vs code, I tend to change the versions according to need.
Currently I have a project which requires me to use tensorflow 1.5-1.7 for which I require python 3.5 or 3.6 max. I have tried installing python 3.6 and then I create a virtual environment with it.
I try installing tenosrflow 1.5 using the below given command
pip install tensorflow==1.5
I get the error
ERROR: Could not find a version that satisfies the requirement tensorflow==1.5 (from versions: 2.5.0rc0, 2.5.0rc1, 2.5.0rc2, 2.5.0rc3, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.6.0rc0, 2.6.0rc1, 2.6.0rc2, 2.6.0, 2.6.1, 2.6.2, 2.6.3, 2.7.0rc0, 2.7.0rc1, 2.7.0, 2.7.1, 2.8.0rc0, 2.8.0rc1, 2.8.0)
ERROR: No matching distribution found for tensorflow==1.5
Is there any way available to maintain 2 different python version as I need to keep both.

Using Uncompyle6 library with virtual environment (virtualenv )

I'm creating virtual environment with virtualenv library.I want to decrypt the .pyc extension file.The purpose of me using this library is that Uncompyle6 library doesn't support python 3.9 it yet.
I installed the 3.8.0 version of python in the virtual environment.Then i installed Uncompyle6 library.
Up to this point there was no problem.When I checked the python version in terminal, it showed 3.8.0
uncompyle6 file.pyc > file.py
When I run this code I get the following error.
RuntimeError: Version 3.9 is not supported.
My questions is:
Why doesn't it reference my version of python in the virtual environment? and
How can I run it with the python version I installed in the virtual environment?

No appropriate python interpreter found. - Cassandra

I am new to Cassandra . I installed Cassandra in RHEL 6.5 , and installed Cassandra 3.5 .
When launch the cqlsh , it gives me the error
No appropriate python interpreter found.
What could be the reason , should I try a lower Cassandra version ? any one encountered the same issue ?
If your Python version is below 2.7, you should upgrade it to at least Python 2.7.
It might be a version between 2.4.x and 2.6.x.
Cassandra versions 3 and greater need at least Python2.7

Cassandra : cqlsh not working on version 3.3 nor 2.2.5

I am new to Cassandra and trying to setup it on Linux version 2.6.18-404.el5 with Java 8 64 bit. I have tried Cassandra version 3.3. and 2.2.5 and getting an error:
cqlsh
File "./cqlsh.py", line 686
ssl_options=sslhandling.ssl_settings(hostname, CONFIG_FILE) if ssl else None, ^
SyntaxError: invalid syntax
It is reporting a syntax error on 'if'
You need to install python 2.7. Probably in parallel to your system installation so not to break your Linux distribution. For Centos 6.5 the instructions here worked like a charm for me. As Centos is a Redhat clone it should work for you as well.
Install dependencies
Download the python 2.7 sources.
Configure and build python; note that you have to make altinstall so not to mess with your system installation of python!
Verify the installation: try python2.7 --version, if everything worked out OK this will print the version info of your python 2.7 installation
Then edit the cqlsh shell script. It contains just one code line. At the start of that line replace python with python2.7, save the file, and now you should be able to run cqlsh.

Will a higher version of Python build Node.js?

I'm running the latest Ubuntu (14.04) and have just downloaded the Node.js tarball. I'm not very familiar with Python though, and although I love Ubuntu, I'm also not familiar with the process of downloading and installing stuff on Linux as well :/
It says on the Node.js download page that Python 2.6 or 2.7 is required, but I have found that newer versions of Python are available. Will a newer version of Python build it correctly?
If you're not familiar with Linux then I don't think you want to compile node.js yourself from source. You can still use the binaries.tar.gz
There are Ubuntu packages that will install node.js for you! Installing from a package manager is easier, try https://github.com/joyent/node/wiki/installing-node.js-via-package-manager#debian-and-ubuntu-based-linux-distributions
As for building from source, there are known issues with Python 3, ref https://github.com/joyent/node/wiki/installation#known-issues, so maybe stick with 2.6 or 2.7
Python versions starting with and including 2.6 up through before 3.0 should work fine. Python 3 brought some backwards incompatible changes with Python 2.x and AFAIK gyp has not been updated to support Python 3 yet.

Resources