My case: I had to install Apache cassandra. I already had Python3 installed in my D: drive. With loads of development work in process on Python 3, i didn't wanted to mess my Python 3 installation. And, i needed Python2 only for Apache cassandra.
You came here looking for answer, so:
- I assume you have all prequisites installed for Apache cassandra, except Python2.
- You did not installed Python2 because you already have Python3 up & running on your system.
- You are getting error when you are trying to run
cqlsh
- You don't want to install Python2 because you don't want to mess up anything in/on already installed Python3.
Well i had same issues. Now, check my answer below.
https://stackoverflow.com/a/58285774/1513779
Advice:
- Don't try
except ImportError as e:
in cqlsh.py as suggested above. You will be caught in loop of numerous errors & warnings. Just install Python2, following steps mentioned in link.