-1

In order to install older version of keras, tensorflow 1.10.0 is needed. That should solve compatibility issues with an algorithm I am trying to run. TO be able to install these older versions of tensorflow and keras and older version of python is required. I have tried to work with different algorithm using my linux system, terminal and have not been successful so far. I wish to know how to downgrade my current python version (replacing my version on the OS system or through a virtual environment) to python 3.5.6 or even 2.7. The code I am trying to run is FSA-Net at https://github.com/shamangary/FSA-Net I am trying to run the demo 'sh run_demo_FSANET.sh' after cloning to my local computer.

  • I do not use anaconda. I use pip.
  • I could not install Pyenv on my ubuntu.
  • I also donot have brew I have qbrew, which does not follow with the other commands suggested at How to downgrade python from 3.7 to 3.6.

Thank you in advance.

Kenan Morani
  • 141
  • 1
  • 9
  • 1
    Does this answer your question? [How to downgrade python from 3.7 to 3.6](https://stackoverflow.com/questions/52584907/how-to-downgrade-python-from-3-7-to-3-6) – mnikley Jan 16 '23 at 11:10
  • - I do not use anaconda, I use pip. - Pyenv method didnot work as I could not install Pyenv on my ubuntu; 'pyenv' command not recognized. The rest I am checking. – Kenan Morani Jan 16 '23 at 11:20

1 Answers1

2

You can have multiple versions of Python at the same time.
First, install your python ver (alongside your present version):

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.5.6

Then create & setup your project:

cd your_project
# Create venv
python3.5 -m venv venv
# Source 
source venv/bin/activate
# Install everything you need
pip install {package_name}

That's it! You should be good to go.

NOTE: you did not specify what version of Linux you have, so I assumed it's Ubuntu. But the process should be the same for the other versions of Linux also (just different commands).

mighty_mike
  • 714
  • 7
  • 19