devgre.blogg.se

Current python version
Current python version










You can also specify a version using for example py -3 or py -3.6 to launch a specific version, otherwise the launcher will use the current default (which will usually be the latest 3.x). When running, just use py script.py instead of python script.py to use the launcher. That way, you can easily have multiple Python installations side-by-side without them interfering with each other. This avoids you having to put the current Python installation into PATH yourself. This makes it available from the PATH, so you can automatically run it from any shell just by using py instead of python as the command.

current python version

If you want to get rid of Python 2.7, you can uninstall it before or after installing a newer version-there is no difference to this.Ĭurrent Python 3 installations come with the py.exe launcher, which by default is installed into the system directory. So if you want to keep your installed Python 2.7 around, then just let it and install a new version using the installer. Only patch versions will upgrade existing installations. ❯❯ ~ python -c 'import platform print(platform.Every minor version of Python, that is any 3.x and 2.x version, will install side-by-side with other versions on your computer. ❯❯ ~ python -c 'import platform print("".format(platform.python_version_tuple()))' ❯❯ ~ python -c 'import platform print(platform.python_version())' ❯❯ ~ python -c 'import sys print(sys.version_info)' sys.version_info(major=3, minor=11, micro=0, releaselevel='final', serial=0) ❯❯ ~ python -c 'import sys print((str(sys.version_info.major) +"."+ str(sys.version_info.minor)))' V:3.9 C:\Program Files\Python39\python.exe The default Python version and the paths of all installed versions on Windows: py -0p usr/local/lib/python2.7/test/test_site.pyo usr/local/lib/python2.7/test/test_site.pyc usr/lib/python2.6/site-packages/site.pyo

current python version

usr/lib/python2.6/site-packages/site.pyc Multiple installations will have output something like this: /root/Python-2.7.6/Lib/site.py The output for a single Python installation should look something like this: /usr/lib64/python2.7/site.py Locate site.py # All installations I've ever seen have this

current python version

This is my rough-and-ready approach to finding out what versions are installed: updatedb # Be in root for this You may have other versions installed and this can cause problems, particularly when installing additional modules. Although the question is "which version am I using?", this may not actually be everything you need to know.












Current python version