Jul-18-2023, 05:23 AM
(Jul-17-2023, 03:31 PM)deanhystad Wrote: Python 3 programs generally don't run under Python 2. There were many changes going from 2 to 3. For example, print was a statement (no parenthesis) in python 2, but in python 3 it is a function.
Does your linux have a python3? From a shell, try this:
If you don't get an error, you can run your script using python3 in place of python. If not, you can install python 3. You should look for instructions for your linux version to make sure you don't damage your python 2 installation.
Output:python3 --version
The python version in linux is 2.6.6.It seems Python 3 cannot be installed in the Linux server atleast in the near future.I need to make this code compatible with 2.6. How can i achieve that.