Home > OS >  Run python 2 code in python 3 environment
Run python 2 code in python 3 environment

Time:03-01

There is a way to run python 2.7 code in python 3 environment without translate the code? Currently on my pc I have installed python 3.8.

CodePudding user response:

You could try using 2to3 to convert it. You may have to make some manual changes afterwards. The other option is just to install Python 2.

CodePudding user response:

Pyenv let you switch between 2 and 3 python.

  • Related