Python Forum
Python App On Different Versions
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python App On Different Versions
#1
How To know if my python app can run on different versions of python 3.x And 2.7 also!
Reply
#2
(Aug-25-2020, 01:46 PM)Harshil Wrote: How To know if my python app can run on different versions of python 3.x And 2.7 also!
well, you should know how you have written it (what minimum target version you had in mind). of course you should know also the differences in different python versions. At the moment it no longer makes sense to target python2 at all
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
In addition to buran's recommendation,

if you install pyenv (see: https://python-forum.io/Thread-pyenv-Sim...ight=pyenv )
you can easily switch python versions and then try running under each

and again, stay away from python 2.7 it's extinct
Reply
#4
If on Windows look here.
There is part about py there,which is used to run other versions.
C:\1
λ python -V
Python 3.8.3

C:\1
λ python hello.py
Hello from 3.8.3

# Run 2.7
C:\1
λ py -2.7 hello.py
Hello from 2.7.9

# Install to 2.7
λ py -2.7 -m pip install logzero
Requirement already satisfied: colorama; sys_platform == "win32" in c:\python27\lib\site-packages (from logzero) (0.3.2)
So python and pip always point to then main version eg 3.8,and py can access all other version from python.org.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  multiple versions of Python Skaperen 6 2,945 Jun-13-2019, 12:32 AM
Last Post: Skaperen
  compiling various versions of Python, which toolchain? Skaperen 4 2,721 Jun-06-2019, 06:28 AM
Last Post: Skaperen
  running other older versions of python Skaperen 20 9,959 Mar-03-2018, 02:23 AM
Last Post: Skaperen
  many versions on python on linux Skaperen 8 5,755 Oct-17-2017, 02:22 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020