I have Python 2.7.12 installed, and I need to downgrade to 2.7.10 due to this issue while running Cassandra.

I don't want to have two Python installations side-by-side as a lot of answers in this forum suggest. I want to eradicate 2.7.12 from the system and a clean installation of 2.7.10.

What's the best way of doing this?

I'm running Ubuntu 16.04.

  • You are asking the wrong question. From the topic I gather you want Cassandra working and not to downgrade python. Correct? Then please ask THAT. See the last line of the 1st answer in the topic you linked: you need Cassandra 3.9 or higher. Here is 3.11: cassandra.apache.org/download And even then: the 2nd answer ALSO fixes this problem for Cassandra 3.7. Why the need for the downgrade of python? – Rinzwind Feb 10 '18 at 20:20
  • 1
    @Rinzwind no, I asked the question correctly. I'm running Cassandra 2.1.13, so that's not an option for me. – Pedro Gordo Feb 10 '18 at 20:21
  • Well if I was you I would always upgrade something. So start using Cassandra 3.11 :-) Downgrading should be a final resort. Even though it is a minor version difference the impact might cause more to break than it fixes. – Rinzwind Feb 10 '18 at 20:23
  • 1
    @Rinzwind As much as I agree with you (I really do), due to reasons external to me, I can't upgrade the cluster at the moment. – Pedro Gordo Feb 10 '18 at 20:26

Ok then; consider yourself warned ;)

Have a look at https://github.com/pyenv/pyenv#installation

pyenv does...

  • Let you change the global Python version on a per-user basis.
  • Provide support for per-project Python versions.
  • Allow you to override the Python version with an environment variable.
  • Search commands from multiple versions of Python at a time. This may be helpful to test across Python versions with tox.

Would that work for you? You will need to install both version though. pyenv uses an own reference to PATH to switch to the other version. Not what you asked but it so much more versatile this way.

  • Will try it out, cheers! :) – Pedro Gordo Feb 10 '18 at 20:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.